Customization directory path per project ?
-
I'm trying to compile a Linux game (Freeciv) with visual C++. The project is organized in severall libraries and 2 .EXEs. As it is a gnu cimpilation I would like to modify the sources as few as possible. I've got a problem because each of the libraries has its sources and headers in a separate folder. Each time I try to compile the main project I've got the "fatal error C1083: Cannot open include file: 'astring.h'" error. I know I can add those libraries directories to Visual Studio search path by using the Tools | Options | Directory menu. But this setting is for the whole Visual C++ not only for my project. Is there a way to add those directories to the compiler search path just for a single project ? Yarp http://www.senosoft.com/
-
I'm trying to compile a Linux game (Freeciv) with visual C++. The project is organized in severall libraries and 2 .EXEs. As it is a gnu cimpilation I would like to modify the sources as few as possible. I've got a problem because each of the libraries has its sources and headers in a separate folder. Each time I try to compile the main project I've got the "fatal error C1083: Cannot open include file: 'astring.h'" error. I know I can add those libraries directories to Visual Studio search path by using the Tools | Options | Directory menu. But this setting is for the whole Visual C++ not only for my project. Is there a way to add those directories to the compiler search path just for a single project ? Yarp http://www.senosoft.com/
well, one simple fix is to put the full path of the files when you include them, ex:
#include "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\include\astring.h"
I dont know where astring.h is, but thats what i had to do for a project a few months ago. just put the full path in the include "" things. *.* cin >> knowledge;
-
I'm trying to compile a Linux game (Freeciv) with visual C++. The project is organized in severall libraries and 2 .EXEs. As it is a gnu cimpilation I would like to modify the sources as few as possible. I've got a problem because each of the libraries has its sources and headers in a separate folder. Each time I try to compile the main project I've got the "fatal error C1083: Cannot open include file: 'astring.h'" error. I know I can add those libraries directories to Visual Studio search path by using the Tools | Options | Directory menu. But this setting is for the whole Visual C++ not only for my project. Is there a way to add those directories to the compiler search path just for a single project ? Yarp http://www.senosoft.com/
Go to Project | Settings | C/C++ | Preprocessor and add the include directory to the "Additional include directories" field. For example, you could add "..\include" (without the quotes). You can do a similar thing for the .lib files: go to the Link tab, and under Input, add the lib path to "Additional library path". Tip: if you do either of the above, make sure the project is selected in the tree on the left, not just one file in the project. Also, make sure "All Configurations" are selected in the combobox (although you might have separate libs for debug and release, in which case you will want to do the Link step twice). HPS HwndSpy - GUI developer's aid to visually locate and inspect windows. For the month of August only, use coupon code CP-81239 for 30% off.
-
Go to Project | Settings | C/C++ | Preprocessor and add the include directory to the "Additional include directories" field. For example, you could add "..\include" (without the quotes). You can do a similar thing for the .lib files: go to the Link tab, and under Input, add the lib path to "Additional library path". Tip: if you do either of the above, make sure the project is selected in the tree on the left, not just one file in the project. Also, make sure "All Configurations" are selected in the combobox (although you might have separate libs for debug and release, in which case you will want to do the Link step twice). HPS HwndSpy - GUI developer's aid to visually locate and inspect windows. For the month of August only, use coupon code CP-81239 for 30% off.
Thanks a lot, I've been wondering if it was possible for a long time now - but this afternoon I had no choice since I wanted this gnu project to be as less modified as possible. Thnaks a lot for the reply ;) Yarp http://www.senosoft.com/