File not included

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Fraza
Posts: 113
Joined: Sat Feb 26, 2005 11:28 am
Location: Leeds

File not included

Post by Fraza »

I am using Microsoft Visual C++ 6.0 and the following file structure:

Code: Select all

[Project]
  bin
    release
    debug
  scripts
    [contains project and workspace]
  src
    [contains C++ files]
  include
    [contains Header files]
Those are the main files anyway. In my project options I put under "Additional include directories" "..\include". Now when I try and include a header in the include directory from the main source file in the src directory it doesnt work! When I try and right click and press "open file" (when hovering over the #include) it says "cannot find scripts\header.h".

Can somebody put me out of my misery and point out the problem please :)
saigumi
Posts: 921
Joined: Fri Aug 22, 2003 11:31 am
Location: St. Louis, MO USA
Contact:

Post by saigumi »

Is the code you are using:

Code: Select all

#include "scripts\file.h"
Your relative path is off since your source is in \source.

Try

Code: Select all

#include "..\scripts\file.h"
Crud, how do I do this again?
Fraza
Posts: 113
Joined: Sat Feb 26, 2005 11:28 am
Location: Leeds

Post by Fraza »

no, that's not the problem. The file is "..\include\header.h", using that I can get it to work just fine. However, if I try and add to the project settings additional include directories "..\include" it wont let me have #include "header.h".

It doesn't really matter, especially seeing as it's only a compiler directive, but I would really like to do it in a less sloppy way than putting ..\include\ before all my header files.


Thanks for the response :)
jox
Bug Slayer
Posts: 726
Joined: Thu Apr 22, 2004 6:55 pm
Location: Germany

Post by jox »

Did you try #include <header.h>?
It is like it is. And because it is like it is, things are like they are.
Fraza
Posts: 113
Joined: Sat Feb 26, 2005 11:28 am
Location: Leeds

Post by Fraza »

I tried that just now, unfortunately that doesn't work either :cry:.
Post Reply