1

I want to link a library file and a directory to my project, but I want to set this in project files, not from visual studio. I am running msbuild. I tried

    <ItemGroup>  
    <ClCompile Include="test.cpp" />  
    <AdditionalIncludeDirectories>E:\project\Debug</AdditionalIncludeDirectories>
      <Link>
       <AdditionalDependencies>E:\project\Debug\file.lib</AdditionalDependencies>
      </Link>
    </ItemGroup> 

but I get error MSB4035:

the required attribute "Include" is empty or missing and LNK2019 error unresolved external symbol.

Thankyou.

sanduniYW
  • 723
  • 11
  • 19
  • Just do this first with the IDE, then look at the .vcxproj file to see how to do this correctly. You'll discover `ItemDefinitionGroup`. – Hans Passant Aug 21 '18 at 17:37
  • I dont have the IDE installed, anyway if I put this in an it will work ? – warriorforce Aug 21 '18 at 17:38
  • ok, not the error MSB4035 dissapeared, I only have to fix lnk2019. I think it's not reading the #include "E:\project\include\aplication.h" Thankyou – warriorforce Aug 21 '18 at 17:41

0 Answers0