Author Topic: Problems including files  (Read 3347 times)

Offline Aslund

  • Single posting newcomer
  • *
  • Posts: 4
Problems including files
« on: September 08, 2009, 04:21:51 pm »
Hey everyone

I have a strange problem with Code::Blocks.
I have a project called PlayerStage and I need to include some header files. The header files are spread into a few folders, which I have gathered together in a single folder which I call external, the path then becomes: 
PlayerStage/external/the_different_folders_here.
Doing "Add files recursively" adds the external folder, with its subfolders and their headers files. But when I try to add a header files to my project, the compiler says it cant find the file.
The syntax is done like this:
#include <external/libplayerc++/playerc++.h>

The name is without spelling errors, so why cant the compiler add the file?
Thanks for the help.

Regards

Sebastian Aslund

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7582
    • My Best Post
Re: Problems including files
« Reply #1 on: September 09, 2009, 12:35:09 am »
Add the Compiler search directory under the project settings or compiler settings.
If the header is a standard header included with the compiler add under compiler settings.

When in doubt add under project.

Tim S.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Aslund

  • Single posting newcomer
  • *
  • Posts: 4
Re: Problems including files
« Reply #2 on: September 10, 2009, 10:02:58 am »
Thanks Tim, it worked.