473,573 Members | 4,115 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1849
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|V C++ Directories|Inc lude 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******** ********@TK2MSF TNGP15.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
2770
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 php. In other words, if the current working directory is /www/ and you were
5
4100
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 becomes increasingly difficult to ball park the folder when you go deeper and wider down:
1
3294
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 appear to work, because the base being used is the Common7\IDE directory, not my original source directory. Here is the situation: MyApp...
7
78626
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
1673
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 to add around 70 additional include directories to the project's compiler settings. Each of these paths is between 40 and 100 characters long (after...
8
260
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 following:- dsResultsTable.ReadXml(Application.StartupPath & "\Textfiles\ResultsTable.xml") It does not like this, as it takes the application...
8
2595
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 path can take the form of the following: 1. /directory/images/xyz.gif (works fine) 2....
15
6442
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 make it much easier to slap modualar blocks of markup into page frameworks, which may change and so forth. And the few extra bytes, which even for a...
2
4288
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 consistent, but the location that the backup file is on may vary. I have gone through the entire backup and restore process, and it
0
7707
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8037
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7800
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8086
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6432
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5605
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5296
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3743
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2227
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.