468,727 Members | 1,540 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,727 developers. It's quick & easy.

relative paths in VS 2003?

Joe
Hi, can someone tell me how to set up relativ paths in VS2003 C++ ? I have
some source with a tree directory structure that segments include files in
various directories:

#include "../include/config.h" /* Keep this first */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "../include/complex.h"
#include "../include/su3.h"

Can someone tell me how to set up vc++ for this? I basically set up vc++ to
open a new project with location in the directory where the main.cpp is
held. It is from there that the include relative paths should be taken from.
But vc++ doesnt seem to recognise them:

fatal error C1083: Cannot open include file: '../include/config.h': No such
file or directory

can someone tell me how to fix this?

On another nots, where have the project options gone to? I was on a earlier
version of vc++ and have moved onto 2003. Things are a little differennt.

thanks!
Joe
Nov 17 '05 #1
2 1693
Joe wrote:
Hi, can someone tell me how to set up relativ paths in VS2003 C++ ? I
have some source with a tree directory structure that segments
include files in various directories:

#include "../include/config.h" /* Keep this first */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "../include/complex.h"
#include "../include/su3.h"

Can someone tell me how to set up vc++ for this? I basically set up
vc++ to open a new project with location in the directory where the
main.cpp is held. It is from there that the include relative paths
should be taken from. But vc++ doesnt seem to recognise them:
Relative paths will be tried relative to all the paths listed in the
Tools|Options|VC++ Directories|Include paths as well as Additiional Include
paths set in project properties, and relative to the location of the source
file containing the #include directive.

fatal error C1083: Cannot open include file: '../include/config.h':
No such file or directory

can someone tell me how to fix this?

On another nots, where have the project options gone to? I was on a
earlier version of vc++ and have moved onto 2003. Things are a little
differennt.


Property properties. What were you looking for in particular?

-cd
Nov 17 '05 #2
Hi Joe,
I usually add different folders in the Include file path pane of the project
properties. Then you can just specify header file name in quotes (w/o rel
path) and things will compile.
HTH
Ashish

"Joe" <Jo*@tim.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi, can someone tell me how to set up relativ paths in VS2003 C++ ? I have
some source with a tree directory structure that segments include files in
various directories:

#include "../include/config.h" /* Keep this first */
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "../include/complex.h"
#include "../include/su3.h"

Can someone tell me how to set up vc++ for this? I basically set up vc++ to open a new project with location in the directory where the main.cpp is
held. It is from there that the include relative paths should be taken from. But vc++ doesnt seem to recognise them:

fatal error C1083: Cannot open include file: '../include/config.h': No such file or directory

can someone tell me how to fix this?

On another nots, where have the project options gone to? I was on a earlier version of vc++ and have moved onto 2003. Things are a little differennt.

thanks!
Joe

Nov 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by Doug | last post: by
1 post views Thread by Alex VanderWoude | last post: by
7 posts views Thread by Rizaan Jappie | last post: by
3 posts views Thread by Andreas Busse | last post: by
8 posts views Thread by Paul Bromley | last post: by
8 posts views Thread by JJ | last post: by
15 posts views Thread by Lars Eighner | last post: by
9 posts views Thread by bryonone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.