Re: compiling and installing lib's
Mich:
> How do i compile both static and non static librarys under C (.a and .so)
> and how do i install them on the system so they can be found by the linker
> or programs.
I've just been through this process, trying to build the shared
libraries for UIT and SlingShot (Xview C++ and graphics support
routines respectively). The process is straightforward, but I had to
'dig' to learn how. Basically, it goes like this:
1 Compile with -fpic to .o files
2 Create an archive with 'ar' to make the .a static library
3 Run 'ld -shared' to build the shared library
4a Copy the libraries and set permissions
4b Set up any soft links for the shared libraries (for examples,
look in /usr/X11R6/lib)
5 Run ldconfig to set up 'ld.so's cache
The last step makes them visible when linking your applications.
Good luck.
Dean
Reply to: