473,386 Members | 1,753 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,386 software developers and data experts.

Regarding changing directories

Hi,

I am working on VC++. All the source files that I use for compiling the program are kept in the current working directory.
But I would like to specify different folders/paths for inputs when compiling the same program instead of putting it in the current working directory.

How can I do that.

Please help.

Thanks!!!
Aug 11 '07 #1
2 1322
weaknessforcats
9,208 Expert Mod 8TB
Change your project properties to add additional include directory paths for the preprocessor.

This can be done for an individual project:
Project/Properties/C-C++/Proprocessor. Here you can add many paths separated by semi-colons or use the convenient navigation ... provided.

Or fo all projects:

Tools/Options/Projects and Solutions/VC++ Directories. Here you can add paths for includes, libraries, source files, etc. Paths will be searched in the order they appear in the dialog box.

Then move your header files to the correct locations.

Rebuild.

Everything should still work.

FYI:
The preprocessor looks for #include <header.h> along one of these paths.
The preprocessor looks for #include "header.h" in current working directory (where your project files are located) first and if the header is not there, it reverts to #include <header.h>.

Personally, I woukld change all #include "filename" to #include <filename>. Then if you need to fiddle with the header you can make a copy of it, put it back in the project directory and change the include for that one file back to #include "filename" for your builds. When it works, copy the revised header back to its correct folder and change the #include back to #include <filename>.
Aug 11 '07 #2
Thanks for the reply.

In the main program if I need to specify that change to another particular directory for a file, then what code can I write for that.

In the program, I want to specify by code that I am changing to this particular directory. How to do that.

Thanks,
Rishi
Aug 13 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: MENTAT | last post by:
Hi, I am trying to create an installer for my web application. So I added a web setup project to my solution (I am using VS.NET 2003). Been playing around with it since then and it basically...
5
by: oddstray | last post by:
Hi, I'm using WinXP. I wrote a short C utility in which I want to change directories and run programs. When I use the system() method and pass in the same command that works in a cmd.exe...
4
by: Good Man | last post by:
Hi there I have a database with about 20 or so tables, maybe a few thousand rows in each. I am starting to do more complex things with my insertions etc, and I want to start to use...
1
by: s99999999s2003 | last post by:
hi i am currently using the FTP wrapper from http://cheeseshop.python.org/pypi/ftputil/2.0.3 The documentation states "In the current implementation, this doesn't construct "intermediate"...
1
by: archana | last post by:
Hi all, I am having one confusion regarding changing cursor to wait cursor I am providing auto refreshing facility for listview using timer. So what i am doing is when auto refreshing is in...
1
by: Developer.Man4 | last post by:
Dear all :) i have a very simple and easy question, is any virtual directory web shared enabled?? if yes, can we conclude that any web enabled folder is a virtual directory and any virtual...
9
by: silverburgh.meryl | last post by:
i am trying to use python to walk thru each subdirectory from a top directory. Here is my script: savedPagesDirectory = "/home/meryl/saved_pages/data" dir=open(savedPagesDirectory, 'r') ...
0
by: kumarboston | last post by:
Hi All, I have data in 20 different folders named from step_1...step_20 and each folder has some files which I am trying to manupulate and after that my program should make directories named...
21
by: DP | last post by:
Hi, I'm not sure if this is the right group to ask. I am developing a small image library and I don't know how to hide the actual path to the image. So I go to the stock photo library websites...
11
by: =?Utf-8?B?UGF1bA==?= | last post by:
I did a google search but could find what I was looking for. I am creating a temporary folder and placing files in it with a web application. The temporary folder name needs to be changed...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: 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
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...

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.