How can I specify where MSVC searche开发者_Python百科s for include files? I want to add the boost headers to the search path. I am not using a Visual Studio project, just the compiler.
You need to edit them into %INCLUDE% environment variable. You can find this via the System Properties property pages, e.g.
- (Windows 8+ only) Windows+X, Y, Advanced System Settings
- (Windows Vista, 7 only) Windows key (Windows+W on 8+), "env", Edit environment variables for your account
- (Windows XP) Control Panel, System Properties
- (All) Start->Run:
sysdm.cpl
and then Advanced, Environment Variables.
The VS command prompt also adds its own; you could modify its batch file too to add your extras in. You'll find that at C:\Program Files\Microsoft Visual Studio 10.0\Common7\Tools\vsvars32.bat
.
(I'd already started typing about the IDE before you edited the question. Details here)
Add the desired path(s) to the %INCLUDE% environment variable.
精彩评论