cmark-gfm
cmark-gfm copied to clipboard
Compile with /MT instead of /MD in MSVC
Hey all, I'm compiling cmark-gfm (master) on windows using nmake with x64 Native Tools Developer Command Prompt for VS2019. When I try com link the .lib with my program the VS2019 raise the following error:
1>cmark-gfm_static.lib(map.c.obj) : error LNK2019: unresolved external symbol __imp_bsearch referenced in function cmark_map_lookup 1>(...).exe : fatal error LNK1120: 1 unresolved externals
I read that this error is related to the run-time library, and I saw that the .lib was compiled with MSVCRT
cmark-gfm\build\src>dumpbin /DIRECTIVES cmark-gfm_static.lib
Microsoft (R) COFF/PE Dumper Version 14.27.29111.0
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file cmark-gfm_static.lib
File Type: LIBRARY
Linker Directives
-----------------
/DEFAULTLIB:MSVCRT
/DEFAULTLIB:OLDNAMES
Is there any way to pass an argument to nmake to compile with /MT (LIBCMT)?