VS2017,CPP, 's self-built lib links to a third-party lib,. Is there anything you need to do to the third-party lib to reference the self-built lib, in the main program?

< H2 > output of buliding < / H2 >

1 >.. packagesjsoncpp.0.6.0.1buildnativelibx64v110Releasejsoncpp.lib: warning LNK4272: library machine type "x64" conflicts with target machine type" x86"
1 > F:Visual Studio 2017ProjectsCppDiaryDebugCppDiary.exe: fatal error LNK1120: 13 unresolved externals
1 > Done building project "CppDiary.vcxproj"-- FAILED.

< H2 > directory structure < / H2 >

CppDiary is the main program, referencing another project, Lib1;Lib1, referencing the external library jsoncpp, is imported in NuGet.

< H2 > question < / H2 >

Lib1 building is normal;
main program cannot build.

Mar.07,2021

https://stackoverflow.com/a/1.


.h files corresponding to third-party lib libraries should also be added.

 include lib
Linkerlib
Menu