473,394 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 1835
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Doug | last post by:
If I were to write an include with a relative path like include("../conf/config.php"); What is the use? As far as I understand it, the path is relative to the first script that is called by...
5
by: jason | last post by:
Can anyone help me find a solution to quickly working out relative paths to a folder in the root of my server... Although it easy when you go - say - two levels down: .../includes it...
1
by: Alex VanderWoude | last post by:
I am trying to <include> some text into an XML documentation topic, but that text is stored in a file that is in a different directory than the "current" XML file. Using a relative path does not...
7
by: Rizaan Jappie | last post by:
is it possible to get the relative path based on a absolute path in c#? *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it!
3
by: Andreas Busse | last post by:
Hi, I received a big fat package of source code developed with Metrowerks CodeWarrior and now I am trying to convert this project to VC.NET 2003. My problem is, that in order to compile I have...
8
by: Paul Bromley | last post by:
I am trying to get somewhere with user controls and have come up against an obstacle with using relative paths. I have a dataset in my user control, and have tried to enter the path with the...
8
by: JJ | last post by:
I'm confused about paths. I have a functionn that uses the mappath method, which I think requires a virtual path (is that the same as a relative path?). But this doesn't always work as the...
15
by: Lars Eighner | last post by:
Aside from the deaths of a few extra electrons to spell out the whole root relative path, is there any down side? It seems to me that theoretically it shouldn't make any difference, and it would...
2
by: BD | last post by:
Hi there. Using 8.2 on Windows. I have a situation where I have a db backup, which I want to deploy to a group of developer workstations. The target directory for the database files will be...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.