Skip to main content

Thread: [C] Linking shared library


i have project in c, i'd compile shared library.

currently, have 1 file compile/link, that's going expand shortly. so, here's build process:

code:
gcc -wall -c -fpic mylib.c  ld -shared -soname libmylib.so.1 -o libmylib.so.1.0 -lc libmylib.o
(i'm following this tutorial, if helps.)

problem:

code:
<snip *clean, no errors* gcc compile>      mylib.c:(.text+0xa3): undefined reference `__stack_chk_fail_local'  ld: libmylib.so.1.0: hidden symbol `__stack_chk_fail_local' isn't defined  ld: final link failed: bad value  make: *** [link] error 1
any ideas? i'm not doing messy code, , i'm not exporting, using, defining, or linking (in knowledge) __stack_chk_fail_local. can find on web stuff setting flag on gcc, around feisty, apparently. code links stdio.h

ideas appreciated, particularly have no idea what's happening, that existed.

ps it's not called mylib, if put real name you'd laugh @ me.

it works fine here; paste code.


Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] [C] Linking shared library


Ubuntu

Comments

Popular posts from this blog

How to set the order of FAQs instead of alphabetical

Thread: Get UK Keyboard working

how do I change the e-mail address for my merchant account