Closed springmeyer closed 9 years ago
Had this error! (when building debug version)
Some of the dependenices were built with release runtime flags. You can find the exact library by searching for string VCRT"
in .lib files. In my case it was libxml2 or BZIP because default linker flags for them was /MD (and should be /MDd ).
/p:Configuration="Release"
in msbuild command line can also be a problem for debug version.
Or vice versa, you are building release and have accidentally built one library with debug (VCRTD
in .lib)...
Try to run linktype.bat which calls linktype.ps1 that shows all libs linked with /MT, /MTd or /MDd
.
Example output from latest build:
MT or MTd C:\mb\mapnik-dependencies-64\packages\expat\win32\bin\Release\libexpatMT.lib
MT or MTd C:\mb\mapnik-dependencies-64\packages\expat\win32\bin\Release\libexpatwMT.lib
MDd C:\mb\mapnik-dependencies-64\packages\harfbuzz-build\harfbuzz.lib
MDd C:\mb\mapnik-dependencies-64\packages\mapnik-master\mapnik-gyp\mapnik-sdk\libs\harfbuzz.lib
Seems to be gone after explicitly defining CMAKE_BUILD_TYPE=Release
for harfbuzz.
@alex85k Building debug version is not yet implemented. At the moment it's release only
, that's why there is /p:Configuration="Release"
.
But, building a debug version is in the works.
Verified with a new build. LNK4098 is gone. But there's another one: LNK4075 #13
@BergWerkGIS - this is the warning that I mentioned worries me. So here's a ticket to track finding how the cause of this. It looks like it might be a dependency that is built in debug?