on-internet
← Community

getting ld to ignore undefined references when making a DLL

Stack Overflow ·

I'm trying to get gcc's ld to ignore unresolved references when putting together a shared library from a bunch of object files compiled with -fpic flag. I tried a bunch of options so far such as (replaced the long file names of the many object files with a few small ones for brevity): ld --allow-shlib-undefined --unresolved-symbols=ignore-all -shared 1.o 2.o -o lib0.so ld -G 1.o 2.o -o lib0.so (I've red somewhere that -G will allow unresolved references, but had no luck with it.) Running it though gcc (with -Wl,--unresolved-symbols=ignore-all) results in fewer unresolved references as it links

Comments

Sign in or sign up to comment and upvote.

No comments yet.