Log4Cpp for Sun CC Compiler in multithread
environment.
Sorry for my English.
I suggest the following command:
CC=CC CXX=CC CXXFLAGS=-mt LD="CC -
KPIC" ./configure --disable-static --with-pthreads
instead of the previous one
CC=CC CXX=CC LD="CC -KPIC" ./configure --
disable-static --with-pthreads
because the CC manual contains the following
paragraph:
“-mt Compile and link for multithreaded code.
This option:
- Passes -D_REENTRANT to the preprocessor;
- Passes -lthread in the correct order to ld;
- Ensures that, for standard mode (the default
mode), libthread is linked before libCrun;
- Ensures that, for compability mode (-compat),
libthread is linked before libC;
The -mt option is required if the application or
libraries are multithreaded.
Warnings:
You must use this option, rather than -lthread.
If you are using POSIX threads, you must link with
the options -mt -lpthread. The -mt option is
necessary because libC (compatibility mode) and
libCrun (standard mode) need libthread for a mul-
tithreaded application.
”
Best Regards.