LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > AIX
User Name
Password
AIX This forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.

Notices


Reply
  Search this Thread
Old 09-04-2013, 03:50 AM   #1
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 154

Rep: Reputation: 15
How to link custom libraries for making the binary in AIX


I have two libraries which are built by us. I link these libraries to my binary file while compiling (same as in linux). But i am getting linking errors.

ex:
gcc <object files> -o <binary name> -l<lib1> -l<lib2> -L<lib available path>

Please help me to fix this problem in AIX.

Last edited by nagendrar; 09-04-2013 at 03:53 AM.
 
Old 09-04-2013, 04:09 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,840

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
you should use -L first (before -l)
 
Old 09-04-2013, 04:15 AM   #3
nagendrar
Member
 
Registered: Apr 2008
Location: HYD, INDIA.
Posts: 154

Original Poster
Rep: Reputation: 15
Thanks for quick reply.
Tried as you suggested. But getting same problem as earlier.

Thanks,
Nagendra
 
Old 09-04-2013, 04:38 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,840

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
so please give us more info:
full command line and error message
 
Old 09-06-2013, 10:29 AM   #5
Michael AM
Member
 
Registered: May 2006
Distribution: AIX 5.3, AIX 6.1, AIX 7.1
Posts: 123

Rep: Reputation: 33
what errors are you getting? maybe your libraries are missing something.
 
  


Reply



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
Build a custom distro with custom boot and libraries adrian2009 Linux - Distributions 3 08-09-2012 03:16 AM
how to see which libraries a binary program needs r00tb33r Linux - Software 4 02-23-2008 05:22 AM
LXer: Binary Prober for AIX and Linux on POWER LXer Syndicated Linux News 0 11-17-2007 04:11 PM
Cross compiling to Windows binary, including Linux shared libraries Siiiiiii Programming 2 03-09-2007 12:36 AM
AIX: cannot execute binary files felixweimann AIX 2 11-19-2004 01:40 PM

LinuxQuestions.org > Forums > Other *NIX Forums > AIX

All times are GMT -5. The time now is 04:51 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