VS2008 additional include
I can include headers inside other headers with relative paths such as "..\Folder\Header.h", but it does not work if I add to the project's additional include directories "..\Folder". It works for source files, but not header files.
Perhaps you need the trailing \
like this..
..\boost\
or in your case
..\Folder\
Tried that :/
Relative include paths inside source files are relative to the source file.
Relative include paths in a project file are relative to the project file.
In your case, is your project file in the same directory as your source file?
Relative include paths in a project file are relative to the project file.
In your case, is your project file in the same directory as your source file?
Relative include paths inside source files are relative to the source file.
Relative include paths in a project file are relative to the project file.
In your case, is your project file in the same directory as your source file?
Indeed it is. The solution and each project with its source are in neighboring folders. So even if it was relative to the solution, project, or source, it should all use the same relative path.
Can you post up your actual directory structure / paths of all the relevant sources/headers/projects/solutions?
Also, what do you mean by "It works for source files, but not header files"?
Also, what do you mean by "It works for source files, but not header files"?
Can you post up your actual directory structure / paths of all the relevant sources/headers/projects/solutions?
Also, what do you mean by "It works for source files, but not header files"?
The additional include directories work when I include in .cpp files, but not .h files.
Here is my folder tree:
+---Application
| Actions.h
| AppContext.h
| Application.cpp
| Application.h
| Application.vcproj
| MainMenu.cpp
| MainMenu.h
| Scene.h
| SceneManager.cpp
| SceneManager.h
| Window.cpp
| Window.h
|
+---Engine
| Engine.ncb
| Engine.sln
|
+---EntryPoint
| EntryPoint.vcproj
| main.cpp
|
+---Graphics
| AssetManager.h
| AssetManger.cpp
| CameraComponent.h
| ComponentEnum.cpp
| ComponentEnum.h
| Components.h
| ComponentsInt.h
| CullMethod.h
| D3DAsset.cpp
| D3DAsset.h
| DrawableComponent.h
| Forward.cpp
| Forward.h
| Graphics.cpp
| Graphics.h
| Graphics.vcproj
| GraphicsLib.h
| GraphicsWindow.h
| Material.h
| MaterialComponent.h
| MeshComponent.cpp
| MeshNode.h
| Pch.cpp
| Pch.h
| Renderer.cpp
| Renderer.h
| RenderMethod.h
| SimpleCull.cpp
| Texture.cpp
| Texture.h
| TextureComponent.cpp
| TextureComponent.h
| TransformComponent.cpp
| TransformComponent.h
|
+---Input
| Input.cpp
| Input.h
| Input.vcproj
| InputMessages.h
| KeyMap.h
| Keys.h
|
+---Math
| GameMath.h
| Math.vcproj
| Vec2.h
| Vec3.h
| xnacollision.cpp
| xnacollision.h
|
\---Universal
Assert.h
Component.cpp
Component.h
ComponentFactory.cpp
ComponentFactory.h
Entity.cpp
Entity.h
Handle.h
Helpers.h
NotifyDispatcher.h
Singleton.h
Timer.cpp
Timer.h
Universal.vcproj
As an example, I can include Timer.h inside Application.cpp, but I cannot inside Application.h. Inside of Application.h I must use "..\Universal\Timer.h"
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement