简体   繁体   中英

Error building TMXParser using CMake

I'm trying to build this on Visual Studio 2013. I set the include and library paths for ZLIB and TINYXML2 and generated the projects using cmake. When I try to build it, I get these errors:

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 ==========

You need to change something in file 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")

I built it succesfully. You can download it at this link .

Usage:

In Visual Studio, you have to add zlibd.lib into

Project properties->Linker->input

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM