LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Question about GCC linking procedures... (https://www.linuxquestions.org/questions/programming-9/question-about-gcc-linking-procedures-366821/)

vinculum 09-25-2005 05:44 AM

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?

foo_bar_foo 09-25-2005 03:55 PM

can't follow or understand that one so instinct says no.
anybody else ?

vladmihaisima 09-25-2005 07:06 PM

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.

vinculum 09-26-2005 08:20 AM

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 :)


All times are GMT -5. The time now is 11:52 PM.