Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
I am including the right header file for the library function I am using, but the linker keeps saying its undefined.
I am including the right header file for the library function I am using, but the linker keeps saying its undefined.
✍: Guest
In the general case of calling code in an external library, using #include to pull in the right header file(s) is only half of the story; you also have to tell the linker to search the external library itself. The declarations in the header file only tell the compiler how to call the external functions; the header file doesn't supply the definitions of the external functions, or tell the compiler/linker where to find those definitions.
In some cases (especially if the functions are nonstandard) obtaining those definitions may require explicitly asking for the correct libraries to be searched when you link the program. (Some systems may be able to arrange that whenever you #include a header, its associated library, if nonstandard, is automatically requested at link time, but such a facility is not widespread.)
2016-02-10, 1443👍, 0💬
Popular Posts:
How is normally a project management plan document organized ? PMP document forms the bible of a pro...
What is the output of printf("%d")? 1. When we write printf("%d",x); this means compiler will print ...
What is the difference between Session State and ViewState? ViewState is specific to a page in a ses...
What is the difference between Authentication and authorization? This can be a tricky question. Thes...
How do I install JUnit? First I will download the lastest version of JUnit. Then I will extract all ...