Getting CppUTest and Eclipse run together.

1,558 views
Skip to first unread message

IwantToLearnWingChun

unread,
Sep 27, 2014, 8:48:00 AM9/27/14
to cppu...@googlegroups.com
Hello!

I've got a problem getting CppUTest running with Eclipse and I don't know where else to look for a solution.
I've done everything what was mentioned in the first 3 minutes of this video to setup the system, but i always get errors when building the (simple) project.
http://www.tvagile.com/2010/10/20/c-and-tdd-getting-started/

In the video he adds the CppUTest library folder to the library folder search path. But in my lib folder aren't any files so it's clear that the linker can't find what he's searching for.
I than copied all src files into my project but this just gave me more errors.

I'm using Eclipse Luna with the newest available Cygwin files.

Could someone please tell me which steps I have to exactly follow, to get CppUTest running with Eclipse??


Best regards




IwantToLearnWingChun

unread,
Sep 27, 2014, 12:08:17 PM9/27/14
to cppu...@googlegroups.com
A wonder just happened!
I just started my brain, read the Readme.md file and followed the installation instructions using the cygwin bash which seems to be a must!

I don't understand this stuff, and it isn't really plug and play.

Why are those steps necessary?

For now I'm happy! But we will see what the future brings. :)

IwantToLearnWingChun

unread,
Sep 28, 2014, 7:55:18 AM9/28/14
to cppu...@googlegroups.com
Damn, I like TDD. :))

Felipe de Andrade Neves Lavratti

unread,
Sep 28, 2014, 10:02:20 AM9/28/14
to cppu...@googlegroups.com
I use CppUTest in eclipse with no problems, which means: Eclipse properly indexes CppUTest headers, so auto complete and code highlight works. Is that what you want too?

Since some recent version its been included the Build Output Parser (BOP) feature into the Eclipse CDT, where eclipse reads the build line (gcc -Wall ...) during the build and auto configure itself with defines and includes passed in the build line. If you configure the BOP properly, eclipse will seamlessly work with included libraries wherever you put them.


At.

On Sun, Sep 28, 2014 at 8:55 AM, 'IwantToLearnWingChun' via cpputest <cppu...@googlegroups.com> wrote:
Damn, I like TDD. :))

--
You received this message because you are subscribed to the Google Groups "cpputest" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpputest+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Skype: felipeanl

James Grenning

unread,
Sep 28, 2014, 10:32:23 AM9/28/14
to 'IwantToLearnWingChun' via cpputest
Glad to hear you've got things going!

--------------------------------------------------------------------------------------------
James Grenning Author of TDD for Embedded C
www.wingman-sw.com http://pragprog.com/titles/jgade/
www.wingman-sw.com/blog
www.twitter.com/jwgrenning

On 28 Sep 2014, at 6:55, 'IwantToLearnWingChun' via cpputest wrote:

> Damn, I like TDD. :))
>

IwantToLearnWingChun

unread,
Sep 28, 2014, 4:04:28 PM9/28/14
to cppu...@googlegroups.com
Am Sonntag, 28. September 2014 16:02:20 UTC+2 schrieb Felipe de Andrade Neves Lavratti:
I use CppUTest in eclipse with no problems, which means: Eclipse properly indexes CppUTest headers, so auto complete and code highlight works. Is that what you want too?

This works great for me now.
I'm just not that familiar with working with libs and have to build them on my own.
My fault was, that I didn't read the README properly.

After doing that everything is working well!

Thanks James, I'm right at the beginning of using TDD but I like this way of developing software!!

A. Robert S.

unread,
Oct 2, 2014, 2:52:46 AM10/2/14
to cppu...@googlegroups.com
Hi IWTLWC,
 
I don't know about the video you watched but I gather from your description (lib folder empty) that you hadn't built CppUTest yet. Since CppUTest can run on many systems and be compiled with many compilers, it is necessary to first build it on your particular system and with your particular compiler. That's why it can't be "plug and play". (In the project I work for, evrybody is supposed to use the same compiler and system environment, so we compiled CppUTest once and for all and versioned the libs so for them, it's plug and play :-).
 
You may also be interested in setting up the CppuTest test runner for Eclipse, which will allow you to run tests selectively, JUnit style.
 
Regards,
Robert
Reply all
Reply to author
Forward
0 new messages