At 07:07 PM 3/3/99 -0500, you wrote: > Writing a shared library is no different from writing a normal >program. The only difference is there is no 'linking' stage of the compile. >Also, you cannot have a main() function. > The linking occurns runtime when you open the shared library (or >all at once when you open the shared library, depending on your open options). >You just need to be a bit more careful when write the things. > You also need to compile it with the -shared and -rdynamic... hmm >and i also use -nostdlib for some reason, maybe that's just with that >set of plug-ins. Dunno, i chose to do some funky makefile magic to make >compiling modules really easy... it makes my brain hurt to remember all >those wierd make options... :) No linking stage would mean you have a bunch of .o files (assuming more than 1 .c goes into the library). How do you create the .so from the .o's? (Sorry if this is a basic question for shared object creators; hopefully other CircleMUD coders are finding mud-related value in this.) Without looking at other source and without further man-page reading, I'm assuming if I have: foo.c and bar.c; and I "cc -c *.c" to create foo.o and bar.o, I can then "cc -shared -rdynamic -nostdlib foo.o bar.o -o myobject.so"; is this off base? Thanks! +------------------------------------------------------------+ | Ensure that you have read the CircleMUD Mailing List FAQ: | | http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html | +------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST