User forums > Using Code::Blocks
Lost functions in external header files
spartarra:
Good morning everyone,
Problem: Configuration of Code::Blocks 8.02 when it has to find functions from other files.
Situation: When I try to compile the attached .c code telling the compiler to look in the include file directory, the compiler says : undefined reference to '<function>'. This function has been included in the include part.
So there has to be a way of telling the compiler to tell him to look not only if the files exist, to check the functions.
Thanks in advance,
Spartarra
[attachment deleted by admin]
Jenna:
It's not enough to include the header-files, you also have to link against the appropriate library.
spartarra:
Project - Build options...
I select top level (debug and release at the same time)- Search directories and in Compiler and Linker boxes I add the directory.
It is not still working.
dje:
Hi,
You have set where to search for libs.
Now you have to specify libs you are using on the linker tab.
Dje
Jenna:
--- Quote from: spartarra on November 27, 2008, 02:33:42 pm ---Project - Build options...
I select top level (debug and release at the same time)- Search directories and in Compiler and Linker boxes I add the directory.
It is not still working.
--- End quote ---
Which directory ?
The directory with the header files ?
If you want to use external functions, you need either the source files or a compiled library.
Header files are not enough.
Please have in mind, that this forum is for C::B related questions only, not a forum to teach the basics of programming.
Navigation
[0] Message Index
[#] Next page
Go to full version