User forums > Help
File path for header files
H:
I downloaded FLTK (Fast Light Toolkit) and I'm having trouble using the header files in it. Normally I store all of my C++ files and header files in a separate folder located in my User folder. However, when I extracted the FLTK folder(which holds the files) into this folder, and tried to compile a program that includes some of the header files, it was unable to locate them. Is there a place I should put the FLTK folder so the compiler will be able to access it, or a way to specify a file path to look for header files?
dmoore:
project -> build options ->search directories -> (compiler or linker)
note that you can set directories to be project or target specific (manage your targets in project -> properties)
you can also declare global variables that reside in your user settings, so that you don't have to hardcode paths in your project files.
see also:
http://wiki.codeblocks.org/index.php?title=The_build_process_of_Code::Blocks
http://wiki.codeblocks.org/index.php?title=Global_compiler_variables
http://wiki.codeblocks.org/index.php?title=Builtin_variables
H:
Build options is greyed out. I'm not in a project, it's just a C++ file.
dmoore:
you can also set global directories in settings -> compiler and debugger. but why not just make a project?
H:
I'm self learning and am doing lots of individual small exercises, so I don't want to make a project for every one, or make the whole thing one big project.
So if I select put under search directories a folder with other folders in it, will it read into those too? I'm still running into compiler errors and I'm thinking it's because I need to specify every sub folder that needs to be read into. The file path kind of looks like this...
C:/Users/Alex/C++/ftlk
Then there are lots of folders in ftlk with headers in them. However, all I added in to the search directories was what I listed above. Do I need to specify all of the directories inside of ftlk as well?
Navigation
[0] Message Index
[#] Next page
Go to full version