LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to write makefile to create shared library in 2.6 kernel (https://www.linuxquestions.org/questions/linux-software-2/how-to-write-makefile-to-create-shared-library-in-2-6-kernel-271400/)

yogeshwar_s 12-28-2004 11:58 PM

How to write makefile to create shared library in 2.6 kernel
 
Does anyone knows what will be the makefile to create shared libraries (.so) in 2.6 kernel

what is the difference between lib-y & lib-m target?

daihard 12-29-2004 12:39 AM

Re: How to write makefile to create shared library in 2.6 kernel
 
Quote:

Originally posted by yogeshwar_s
Does anyone knows what will be the makefile to create shared libraries (.so) in 2.6 kernel
Why does the kernel version matter? All you have to do is use the "-shared" flag with the gcc (or g++) command as part of the linker flag, isn't it?
Code:

gcc -shared -L/your/libpath -o libyourlib.so obj1.o obj2.o obj3.o...


All times are GMT -5. The time now is 07:41 AM.