Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create library on Unix/C++ and link for exe later 2

Status
Not open for further replies.

CMyLove

Programmer
Jan 27, 2001
6
US
Hi Guys
Can somebody tell me how to create library file and link the same for creating an executable with some other object file please. Assume that the compiler is GNU's g++.
Thanks to all.
 
Can you use <ar>?
This command makes archives of you object(compiled sources) files. So your .o files are archived in a .a or .lib file.
than you can use <ld> to link it to an executable or to build a shared library.
Have a look at the manual pages for : ar, ld
I'm sorry i cannot connect to linux now so i cannot do more.
Hope it helped somehow!
 
I am very much thankful for the help given by MESI. I will go ahead with your guidence. Thank You.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top