Reputation: 420
I am trying to use C:\Prpgram Files (x86) on X64 machine and C:\Program Files on X86 machine in my build to refer to a VBA path like blow
I use the following path in my Project ->Properties -> C++ -> Additional Include Directrories
C:\$(MSBuildExtensionsPath32)\VBA6SDK\include
But I get compilation errors on a X86 machine since It cant find some header files located at C:\Program Files\VBA6SDK\include
if I replace $(MSBuildExtensionsPath32) with "program files" no issues.
This is a MFC project that I am building using VS2010.
What am I missing ?
Upvotes: 0
Views: 3233
Reputation: 941277
The $(MSBuildExtensionsPath32) property normally contains "C:\Program Files (x86)\MSBuild". The directory where MSBuild extensions are stored.
This of course has nothing to do with the VBA6SDK you are trying to use so the property is not very useful. You can use $(ProgramFiles)
to use the system environment variable, it will be C:\Program Files (x86) on a 64-bit English operating system for the 32-bit toolchains. Don't prefix with C:\
Upvotes: 1