[EMAIL PROTECTED] writes:

>  In function `main':
>  : undefined reference to `log4cxx::BasicConfigurator::configure()'
>  /home/maksim/tmp/ccvVAxjg.o(.text+0x44): In function `main':
>  : undefined reference to `log4cxx::Logger::getRootLogger()'
>
>
> I included all the header files needed. I think the problem is in how I
>  compile the program.

The problem is in how you *link* the program.

> Maybe I need to include a library?

Most likely.

> The problem is
> that I did not find any libraries in the log4cxx folder.

You probably need to build it first.

If you installed a binary package for the library, use your package
manager to find out where the library itself was installed.

Also, on UNIX there are no folders, only directories.

>  g++ -D_REENTRANT -pipe -O3 -march=i586 -fomit-frame-pointer
>  -I/home/maksim/projects/log4cxx-0.9.7/include -D_GNU_SOURCE
>  -L/usr/local/lib -lccgnu2 -ldl -lrt -pthread *.cpp -o server

That command line is totally backwards.
Libraries ('-lccgnu2', '-ldl', '-lrt') are supposed to *follow*
sources (and objects) on the link line, not preceed them.

To understand why this might be important, read this:
 http://webpages.charter.net/ppluzhnikov/linker.html 

Cheers,
-- 
In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.
_______________________________________________
help-gplusplus mailing list
help-gplusplus@gnu.org
http://lists.gnu.org/mailman/listinfo/help-gplusplus

Reply via email to