Not logged in, Join Here! or Log In Below:  
News Articles Search    

 Home / General Programming / CPPUNIT Account Manager
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.

December 26, 2004, 04:20 PM

can any one pleas give me an explenation on how to use CPPUNIT (in c++),
i'm compiling on gcc/g++ (linux) if it makes any differance.

Brandon Bloom

December 27, 2004, 01:06 AM

Is there no end to this sea of people who can't use Google?!?,GGLD:2004-31,GGLD:en&q=CPPUNIT+tutorial


December 27, 2004, 04:29 AM

first of all thanx.
for nothing, i can use google. what i wanted was help on how to use it and make it run.
there is an old saying that goes, "if you have nothing to say, SHUT THE FUCK UP". maybe you should see if that saying can be apllied on you.


December 27, 2004, 06:39 AM

> what i wanted was help on how to use it and make it run.

A quick glance at the first page of results Brandon's link takes you to shows some very promising candidates in that department. For instance, the very first result has "Installing CppUnit" and "Using CppUnit" sections.

The point being: Installing and using CppUnit is a problem all users of that package have to solve. Consequently, it is likely there is extensive documentation available on how to go about this. Why wait on someone writing yet another guide in this forum when the same information is readily available?

And besides all that, an answer you find disappointing is no reason to loose your cool and stop being polite.



December 27, 2004, 07:32 AM

iceman: It is also good practice that new forum members better be very polite and listen carefully when asking for help. You don't exactly seem to be determined to make a good start here, are you ?


December 27, 2004, 02:30 PM

firts of all i don't find any reson to apologize about the language used in my responce.
second, i read the installation guide, installed what needed to be installed, followed all instructions and i still can't make it work, what i was looking for is some one who has used that before and not a kid who thinks he's smart cuz he can use google. i've been on line before the child could even speak.
any way, i can see now that i was missled, i was told this is a programmers site, judging by you'r responses i am not sure if that's the case.

returning to the subject, if there is anyone who has experience on CPPUNIT, please speak up.


December 27, 2004, 02:59 PM

I have. I works quite well.


December 27, 2004, 03:01 PM

I would gladly help but you are not being specific about your problem. ( which is the reason why you are getting such responses). Could you install it? could you compile your programs? what was the compiler error? and the list goes on...


December 27, 2004, 03:20 PM

the reason i wasn't specific is because i wanted to know if there was a point,
i mean, if no one knows what i'm talkin about, there is no point in going on and explaining what my problem is...
any way, i think the best way for you to understand my problem is to see it, here is a link to my files.

i have a problem compiling the ServerEventTest.cpp


December 29, 2004, 04:26 PM

And WHAT problem do you have ? There are many files, ServerEventTest.cpp is many lines long, where does it fail ? What's the error message ? Which line ?


December 30, 2004, 05:23 AM

it doesn't fail, i couldn't compile it, i get a compilation error and i don't understand what the problem is
this is the error i get
make -f makefile2

ServerEventTest.o: In function `ServerEventTest::testConstructor()':
ServerEventTest.o(.text+0xe8c): undefined reference to `CppUnit::SourceLine::SourceLine[in-charge](std::basic_string const&, int)'

maybe i have a problem in the makefile itself, or maybe it's somehing else,,, i'm lost.


December 30, 2004, 09:09 AM

That's not a compilation but linking error. You apparently aren't linking with some translation unit that was supposed to be compiled into object file previously. In short: check what arguments the linker gets, it is missing some .a or .o file.

Victor Widell

December 30, 2004, 10:57 AM

What a looser.

You have a simple problem, but you don't post the error message just because you don't understand it yourself. When someone gives a hint, you shout bad words and act with arrogance.

Even when someone still bothers to help you, you reply with extreme disrespect and illogical statements.



December 30, 2004, 03:21 PM

tussukka wrote: That's not a compilation but linking error. You apparently aren't linking with some translation unit that was supposed to be compiled into object file previously. In short: check what arguments the linker gets, it is missing some .a or .o file.


as for victor ...


March 08, 2005, 11:41 AM

I have gone thro' tutorial of CPPUNIT.
I am new to cppunit as well as linux. But I do have an assignment on cppunit.

I need to add new module for unit testing (on Linux64)in cppunit.

I have used Money example and was able to compile my code using g++.

But I am not able to build entire Money example to get an executable file.
I have used the command given in the tutorial but still not working.

g++ -o tester MoneyTest.o MoneyApp.o /home...path.../TestRunner.o /home...path/

but I am getting error saying undefined reference to dlclose, dlopen,dlsym

Also I am not able to add -lCppUnitRunner as specified in the tutorial, because it does not exist in entire CPPUNIT directory.

can anyone help me out on this.I need to know how to build and form an executable file.

thanks in advance



March 08, 2005, 12:13 PM



March 08, 2005, 01:13 PM



March 08, 2005, 01:50 PM

we definitely don't need more people like this iceman guy on this forum.


March 10, 2005, 04:55 AM

"guys" don't have an answer or not like to answer please do not post negetive reply... here are some people of HOPE to find an answer.


March 11, 2005, 08:40 AM

the best hope lies in the manual

This thread contains 20 messages.
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.