[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: shared object skips exporting some functions varaibles to give unres

From: Paul Pluzhnikov
Subject: Re: shared object skips exporting some functions varaibles to give unresolved symbols while using it in exe
Date: Wed, 13 Sep 2006 16:36:12 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) XEmacs/21.4 (Jumbo Shrimp, linux)

"Nilesh" <> writes:

> I am facing problem in using a so inan EXE . I created the so.
> Versions: g++ 4.4.1 on AIX 5.2 system.

Wow! Current gcc development version is 4.2.
Can I borrow your time machine?

> The EXE is using it like this:
> g++ -o EXENAME -O3 -v  -L/usr/lib/threads  -L/usr/local/lib -L/usr/lib
> -L./../../libs/aix -lstdc++ -lgcc -lgcc_eh -liiapi -lm -lnsl -lpthread
> -lc -Wl,-blibpath:/home/ngujarat/work/BiiF/libs/aix -Wl,-brtl -liif
> ../src/THIRDPARTYEMSReceiver.o  ../src/BiiMain.o

That command line is completely backwards: archive libraries are
supposed to follow objects on the link line, not preceed them.

This doesn't matter much on AIX, but will break on any other UNIX.

> But EXE compilation fails with "ld: 0711-317 ERROR: Undefined symbol:"
> Errors for some constructors. Destructors, static data members in  a
> class. Perhaps these are not referenced directly in course code.

You've omitted the most important part of the message -- precisely
which symbols are undefined.

> NOTE: I ran "nm" on  for Undefined symbols and they are not
> found in the SO.

Are they supposed to be found there?

> WHY Is this happening?

Because you are doing something wrong, and because AIX is PITA to
work with when using GNU tools.

> Anything wrong in building SO or wrong use of SO? Flags missing?

We can't tell since you didn't tell us enough details.

In order to understand recursion you must first understand recursion.
Remove /-nsp/ for email.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]