Sorry, I should probably be more specific, the command line I
mentioned is for my company's library, which I'm trying to link crypto+
+ into. Crypto++ I'm building with the GNUmakefile.
( -DNDEBUG -O2 -fvisibility=hidden -fPIC -ffunction-sections -fdata-
sections -arch x86_64 -arch i386 -DCRYPTOPP_DISABLE_ASM -pipe -c )


I took your advice and tried to link my library against the built
libcryptopp.a (g++ -I../common -I../../apps/support -I../../apps/
crypto/ -Wall -Wno-uninitialized -fvisibility=hidden -fPIC -m32 -O2 -
DNDEBUG -shared -dynamiclib $(LIB_DIR)/libmylibrary.dylib ../../apps/
crypto/libcryptopp.a *.o)

The result was several hundred more undefined symbols. I'm really at a
loss here, I even tried specifying the .o files that the missing
symbols are defined in and it made no difference.


On Aug 12, 8:17 pm, Mouse <[email protected]> wrote:
> I don't know what you're doing - but the Makefile built shared library for
> me - and correctly - just by itself, just obeying "make libcryptopp.so"
> command. This is not Debian, and your manual linking looks weird to me
> (particularly -m32 and making .dylib rather than .so).
>
> Then to use that shared library I simply say "g++ -o t t.cpp
> -L/usr/local/lib -lcryptopp
>
> When there's shared library present there - the linker automatically picks
> it. It does not have to be .dylib (and in fact for cryptopp it isn't).
>
> Why don't you follow the simple way first and get it running?
>
> On Thu, Aug 12, 2010 at 7:04 PM, Matthew Aichi <[email protected]>wrote:
>
> > Well I'm actually trying to link against the object files *.o, this is
> > working fine for me in Debian, I've successfully created both a 32 bit
> > and a 64 bit .so
>
> > g++ -I../common -I../../apps/support -I../../apps/crypto/ -Wall -Wno-
> > uninitialized -fvisibility=hidden -fPIC -m32 -O2 -DNDEBUG -shared -
> > dynamiclib -o ../../lib/Mac-x86-32-gcc/libsomething.dylib ../../apps/
> > crypto/*.o *.o
>
> > On linux my options are the same, minus -dynamiclib and with -Wl,--gc-
> > sections (which apple's GCC doesn't seem to recognize as a valid
> > option)
>
> --
> Regards,
> Uri

-- 
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.

Reply via email to