LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-25-2005, 05:44 AM   #1
vinculum
LQ Newbie
 
Registered: Sep 2005
Posts: 2

Rep: Reputation: 0
Question about GCC linking procedures...


I come from a Windows programming world so there are some things about the Linux programming methodology that keep eluding me... Is it possible to create automatic import libraries for my shared library so that I could for instance just declare a class in the library to be exported and then just link the application code against the import library produced automatically for the shared library and have the class at hand to be used as if the code implementing it were statically linked and located in the executable file?
 
Old 09-25-2005, 03:55 PM   #2
foo_bar_foo
Senior Member
 
Registered: Jun 2004
Posts: 2,553

Rep: Reputation: 51
can't follow or understand that one so instinct says no.
anybody else ?
 
Old 09-25-2005, 07:06 PM   #3
vladmihaisima
Member
 
Registered: Oct 2002
Location: Delft, Netherlands
Distribution: Gentoo
Posts: 196

Rep: Reputation: 33
Didn't understand either.

What is the difference between dynamic linking and "to be used as if the code implementing it were statically linked and located in the executable file" ?

After you link a program is the dynamic loader problem to load the libraries containing the symbols. If you use static linking this step isn't needed but the behavior would be the same - at runtime all the function are available.
 
Old 09-26-2005, 08:20 AM   #4
vinculum
LQ Newbie
 
Registered: Sep 2005
Posts: 2

Original Poster
Rep: Reputation: 0
K. There's no problem then... Since in Windows you have to use import libraries that do the linking for you if you wish to do it the standard way. But didn't know Linux had such an elegant way of dealing with it. Works fine for me now. Should have once again tried before asking
 
  


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 problem with gcc tokernizer Programming 1 11-19-2005 12:56 PM
gcc linking: undefined reference to just about everything shabbychef Programming 7 09-09-2005 08:42 PM
gcc linking error. ugenn Linux - Software 0 01-22-2003 11:18 PM
Linking without gcc, but with ld gluon Programming 3 05-29-2002 05:11 AM
Linking when using gcc/f2c combination? chemspecialist Programming 0 05-17-2001 12:40 PM


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

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