vendredi 30 janvier 2015

MSBuild fatal error C1083: Cannot open include file


Vote count:

0




I know there are others subjects on this, but none of their solutions worked for me. I have this simple code :



#include "stdafx.h"
#include "AccurateTimeStamping.h"

int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}


I would like to build it using MSBuild. The following header is in another directory



AccurateTimeStamping.h


I already successfully build this project using MSBuild and environnement variable. But I want to avoid env variable. In command line I did this :



D:\propTest>msbuild.exe propTest.sln /p:ReferencePath=M:\Utils\include


Or this



D:\propTest>msbuild.exe propTest.sln /p:AdditionalIncludeDirectories=M:\Utils\include


Or This



D:\propTest>msbuild.exe propTest.sln /p:"ReferencePath=<M:\Utils\include>"


Or this :



D:\propTest>msbuild.exe propTest.sln /p:includepath=M:\Utils\include


But I still have :



d:\proptest\proptest\proptest.cpp(5): fatal error C1083: Cannot open include
file: 'AccurateTimeStamping.h': No such file or directory


I can not modify the projects that I have to build and I can't change .vcxproj.


Is there a way to pass the path of .h files to MSBuild using only command line and no env var??


Any help would be greatly appreciated !



asked 3 mins ago

wald

18






MSBuild fatal error C1083: Cannot open include file

Aucun commentaire:

Enregistrer un commentaire