[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

hjælp til dynamisk library med gcc.



Hejsa,

  Jeg vil gerne lære at lave C libraries.
  Jeg har prøvet at følge opskriften på
http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html#AEN95
uden held.

Kan nogle hjælpe udfra nedenstående ?

$ make
gcc -Wall -ansi -Werror -fPIC -c martinlib.c
gcc -shared -Wl,-soname,libmartin.so.1 -o libmartin.so.1.0 martinlib.o -lc

$ sudo mv libmartin.so.1.0 /lib64/
$ sudo ldconfig -v | grep martin
/sbin/ldconfig.real: Can't stat /lib/x86_64-linux-gnu: No such file or directory
	libmartin.so.1 -> libmartin.so.1.0
/sbin/ldconfig.real: Cannot stat /usr/lib/libiodbcadm.so: No such file
or directory
/sbin/ldconfig.real: Cannot stat /usr/lib/libdrvproxy.so: No such file
or directory

$ make example
gcc -o example example.c -lmartin
/usr/bin/ld: cannot find -lmartin
collect2: ld returned 1 exit status
make: *** [example] Error 1


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2011-03-01, 02:01 CET [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *