Click to See Complete Forum and Search --> : writing c++ .so files?


stavefan
12-10-2001, 12:28 PM
Hi all,

i'm looking to write a c++ program, and would like to do so using .so files to logically segment off code that perform similar functions. unfortuatly, i don't know how to write code to export the functions out of the .so file so that I could link it into the rest of the program...like how does the compiler deal with the mangled c++ function names that are exported?

i was wondering if anyone knew of a tutorial/example that would be helpful...i would greatly apprecaite any input for this

thanks
stavefan

EscapeCharacter
12-10-2001, 03:18 PM
when you compile it use the -c option it will compile and assemble the code leaving it available to be linked to other programs later, i believe this is how its done, i could be wrong

Strike
12-10-2001, 03:19 PM
http://www.tux.org/hypermail/linux-gcc/2000-Mar/0001.html

See if that helps

Super Bakemono
12-13-2001, 10:13 PM
escape: you have to do more for a shared lib.

try this:
g++ --shared -o myLib.so myLib.c++
I have no idea if that will work, but something tells me it might...

Super Bakemono
12-13-2001, 10:15 PM
ok, you might have to do a bit more than that...
:rolleyes: