I am still getting errors due to library functions being undefined
I'm still getting errors due to library functions being undefined, even though I'm explicitly requesting the right libraries while linking.
Many linkers make one pass over the list of object files and libraries you specify, and extract from libraries only those modules which satisfy references which have so far come up as undefined. Therefore, the order in which libraries are listed with respect to object files (and each other) is significant; usually, you want to search the libraries last.
For example, under Unix, a command line like
cc -lm myprog.c # WRONG
usually won't work. Instead, put any -l options at the end of the command line:
cc myprog.c -lm
If you list a library first, the linker doesn't know that it needs anything out of it yet, and passes it by.
2015-07-14, 1069👍, 0💬
What is SMC approach of estimation?
How can I enable session tracking for JSP pages if the browser has disabled cookies? We know that se...
Explain in detail the fundamental of connection pooling? When a connection is opened first time a co...
Describe in detail Basic of SAO architecture of Remoting? For these types of questions interviewer e...
What is difference between Association, Aggregation and Inheritance relationships? In object oriente...