[英]Error building TMXParser using CMake
我正在嘗試在 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 ==========
您需要更改文件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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.