Click to See Complete Forum and Search --> : (hidden symbol 'atexit') occured


da_kidd_er
03-04-2005, 08:34 PM
I was compiling the following code when the error (hidden symbol 'atexit') occured.

oss/tools/mlquery/common - make install
/usr/bin/g++ -O2 -Wall -MD -I/root/OpenML/ml/linux/usr/include -I/root/OpenML/ml/linux/usr/include -I/root/OpenML/ml/linux/usr/include/g++ -c mlquery.cxx
/usr/bin/gcc -O2 -Wall -MD -I/root/OpenML/ml/linux/usr/include mlquery.o -L/root/OpenML/ml/linux/usr/lib -L/lib64 -L/usr/lib64 -lML -lMLU -lstdc++ -o mlquery
/usr/bin/ld: mlquery: hidden symbol `atexit' in /usr/lib64/libc_nonshared.a(atexit.oS) is referenced by DSO
collect2: ld returned 1 exit status

any ideas what would cause it to (hidden symbol 'atexit') occured. thanks

bwkaz
03-05-2005, 12:17 AM
Is this something of yours, or are you compiling someone else's package? It looks like the Makefile isn't right. First, the Makefile compiles the cxx file with g++ (which tells me that the program is written in C++, not C):

Originally posted by da_kidd_er
/usr/bin/g++ -O2 -Wall -MD -I/root/OpenML/ml/linux/usr/include -I/root/OpenML/ml/linux/usr/include -I/root/OpenML/ml/linux/usr/include/g++ -c mlquery.cxx Which seems to work fine.

However, when the Makefile is trying to link the object file into an executable, it does this:

/usr/bin/gcc -O2 -Wall -MD -I/root/OpenML/ml/linux/usr/include mlquery.o -L/root/OpenML/ml/linux/usr/lib -L/lib64 -L/usr/lib64 -lML -lMLU -lstdc++ -o mlquery and I bet that's where the problem is.

Try changing into whatever directory contains the mlquery.o file, and do a:

/usr/bin/g++ -O2 -Wall -MD -I/root/OpenML/ml/linux/usr/include mlquery.o -L/root/OpenML/ml/linux/usr/lib -L/lib64 -L/usr/lib64 -lML -lMLU -o mlquery

to try linking it manually, using a compiler driver that knows C++ rules.