LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   question about symbols (https://www.linuxquestions.org/questions/programming-9/question-about-symbols-129661/)

raven 12-28-2003 10:01 PM

question about symbols
 
hello

I am having problems compiling some programs with gcc 3. The problem is, when gcc should be linking the libs, I get unresolved symbol error(s). I took a look at the libs where I found out the symbold are with "nm" and saw, that the symbols needed by the compiler are marked "undefined".

Hows that? What can I do to prevent such stuff? How can I change such symbols to something else?

Any help is appreciated.

Thanks

raven

jim mcnamara 12-29-2003 06:11 AM

If a symbol exists in a library and it is undefined, it means the library calls
the symbol as an extern symbol.

Change the order of the object files and libraries in the command, make sure that the standard libraries like /usr/lib/libc are last. The linker cannot resolve a new symbol in a .o file that is in a library earlier in the list than where the .o file is.


All times are GMT -5. The time now is 07:26 AM.