0

我正在尝试在 Visual Studio 2013 上构建它。我为 ZLIB 和 TINYXML2 设置了包含和库路径,并使用 cmake 生成了项目。当我尝试构建它时,我收到以下错误:

1>------ Build started: Project: tmxparser, Configuration: Debug Win32 ------
2>------ Build started: Project: tmxparser_static, Configuration: Debug Win32 ------
1>cl : Command line error D8021: invalid numeric argument '/Werror=strict-prototypes'
2>cl : Command line error D8021: invalid numeric argument '/Werror=strict-prototypes'
3>cl : Command line error D8021: invalid numeric argument '/Werror'
5>------ Skipped Build: Project: INSTALL, Configuration: Debug Win32 ------
5>Project not selected to build for this solution configuration 
========== Build: 1 succeeded, 3 failed, 1 up-to-date, 1 skipped ==========
4

1 回答 1

0

您需要更改文件中的某些内容CMakeList.txt

set(LIB_CFLAGS "${LIB_CFLAGS} -std=c++11")

if (NOT USE_MINIZ)
    list(APPEND ${LIB_CFLAGS})
endif (NOT USE_MINIZ)

set(EXAMPLE_CFLAGS "${EXAMPLE_CFLAGS} -std=c++11")

我成功构建了它。您可以在此链接下载它。

用法:

在 Visual Studio 中,您必须添加zlibd.lib

Project properties->Linker->input
于 2020-02-09T17:26:45.757 回答