Menu

#49 Sun CC multithread lib.

open
nobody
5
2002-12-02
2002-12-02
No

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.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.