LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 05-15-2013, 06:23 AM   #1
rohaanembedded
Member
 
Registered: May 2013
Location: India
Distribution: Ubuntu 11.10
Posts: 178

Rep: Reputation: Disabled
Unhappy linking the .so file n using


helloO everyone,

I am working ubuntu. i have one .so file how can link it to ma program through Makefile.

actually i have one executable "fx2loader" which loads the firmware to ma device. and i want to use this in ma programm. i have .so for this fx2loader called "libfx2loader.so"

please help me to do this.

Regards
Rohaan
 
Old 05-15-2013, 07:15 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,779

Rep: Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304Reputation: 7304
see the man page of gcc about linking shared objects to applications. You will need to use -l and -L (in general)
 
1 members found this post helpful.
Old 05-15-2013, 09:04 AM   #3
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,856
Blog Entries: 1

Rep: Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869Reputation: 1869
U should add this to ur Makefile:

Code:
LIBS = -lfx2loader
 
1 members found this post helpful.
  


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
linking of assembly(.s) & c file answerme Programming 2 02-20-2013 08:11 AM
What lib is an so file linking to knobby67 Programming 2 05-07-2012 03:16 AM
linking to older file bhert Linux - General 2 02-08-2007 02:14 PM
how does file dependencies work with symbolic linking? bulletck Linux - Newbie 1 12-23-2005 09:22 PM
Problems with linking a file to allegro. RHLinuxGUY Programming 3 09-12-2005 01:33 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:23 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration