dynamic libraries prpoblem
dynamic libraries prpoblem
- Subject: dynamic libraries prpoblem
- From: "Ivan S. Kourtev" <email@hidden>
- Date: Tue, 21 Jun 2005 17:45:48 -0400
This may be perhaps a bit off topic but I am having problems
subscribing to the Darwin-dev list so I thought I'd start by asking
here.
I am having problems compiling and using Linux code that involves
building some shared libraries. I am trying to build a shared
dynamic library from some foo*.o files with a line like this:
g++ -dynamiclib foo1.o foo2.o -o libBar.so
But the above line fails with an "ld: Undefined symbols:" error
followed by a long list of symbols. All of the missing symbols are
defined in another dynamic library libExtra.so located in the folder /
location
So if I try the following line
g++ -dynamiclib foo1.o foo2.o -L/location -lExtra -o libBar.so
everything works fine, no complaints.
Why is that? I was under the impression that it is not necessary for
the linker to be able to resolve the references at the time of
building the dynamic library? I am not a big expert on this and it
seems dynamic libraries on Mac OS X are somewhat different but I am
having trouble figuring out what's going on. Is the first version of
the command (above) never going to work on Mac OS X and I just have
to stick to the second? Thanks in advance for any help,
Cheers,
-- ivan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden