LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 12-28-2004, 11:58 PM   #1
yogeshwar_s
LQ Newbie
 
Registered: Sep 2004
Location: Pune
Posts: 6

Rep: Reputation: 0
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?
 
Old 12-29-2004, 12:39 AM   #2
daihard
Member
 
Registered: Jul 2003
Location: Lynnwood, WA
Distribution: Kubuntu 10.10
Posts: 912

Rep: Reputation: 32
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...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to create a shared library mukund_desh Linux - Software 1 05-24-2005 05:41 AM
Makefile for shared object leonidg Programming 5 04-14-2005 06:24 PM
Linux shell command for makefile.in to create a text file and write to it alix123 Programming 8 01-07-2005 08:18 AM
How to create a Kernel 2.6 Makefile 7.e.Q Programming 1 11-03-2004 07:47 AM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM


All times are GMT -5. The time now is 10:43 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration