halsafar / libtmx-parser Goto Github PK
View Code? Open in Web Editor NEWC++ TMX File Parser - Reads Tiled Map Editor files
License: MIT License
C++ TMX File Parser - Reads Tiled Map Editor files
License: MIT License
undefined reference to `tmxparser::parseFromFile(std::string const&, tmxparser::TmxMap*, std::string const&)'|
I get that error with this line of code:
tmxparser::TmxMap tilemap;
error = tmxparser::parseFromFile("resources/map/map.tmx", &tilemap, "resources/tilemap/");
I try to build it on Win32 (C++) but I met some errors, I searched on google and try so much suggestion such as: #Define ZLIB_WINAPI, rebuild zlib, ...etc. But it still has error:
1>TmxTileLayer.obj : error LNK2019: unresolved external symbol _uncompress referenced in function "private: void __thiscall Tmx::TileLayer::ParseBase64(class std::basic_string<char,struct std::char_traits,class std::allocator > const &)" (?ParseBase64@TileLayer@Tmx@@AAEXABV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@z)
1>TmxUtil.obj : error LNK2019: unresolved external symbol _inflate@8 referenced in function "public: static char * __cdecl Tmx::Util::DecompressGZIP(char const *,int,int)" (?DecompressGZIP@Util@Tmx@@SAPADPBDHH@Z)
1>TmxUtil.obj : error LNK2019: unresolved external symbol _inflateEnd@4 referenced in function "public: static char * __cdecl Tmx::Util::DecompressGZIP(char const *,int,int)" (?DecompressGZIP@Util@Tmx@@SAPADPBDHH@Z)
1>TmxUtil.obj : error LNK2019: unresolved external symbol inflateInit2@16 referenced in function "public: static char * __cdecl Tmx::Util::DecompressGZIP(char const *,int,int)" (?DecompressGZIP@Util@Tmx@@SAPADPBDHH@Z)
I'm getting a compile error when trying to compile libtmxparser using the android ndk.
The compile output is as follows:
[armeabi-v7a] Compile++ thumb: GameRenderer <= tinyxml2.cpp
[armeabi-v7a] Compile++ thumb: GameRenderer <= tmxparser.cpp
jni/libtmx-parser/src/tmxparser.cpp: In function 'tmxparser::TmxReturn tmxparser::parseMapNode(tinyxml2::XMLElement, tmxparser::TmxMap_)':
jni/libtmx-parser/src/tmxparser.cpp:217:2: error: expected ';' before 'return'
jni/libtmx-parser/src/tmxparser.cpp:218:2: error: expected ';' before 'return'
jni/libtmx-parser/src/tmxparser.cpp:219:2: error: expected ';' before 'return'
jni/libtmx-parser/src/tmxparser.cpp:220:2: error: expected ';' before 'return'
jni/libtmx-parser/src/tmxparser.cpp: In function 'tmxparser::TmxReturn tmxparser::parseImageNode(tinyxml2::XMLElement, tmxparser::TmxImage_)':
jni/libtmx-parser/src/tmxparser.cpp:305:2: error: expected ';' before 'return'
jni/libtmx-parser/src/tmxparser.cpp: In function 'tmxparser::TmxReturn tmxparser::parseTilesetNode(tinyxml2::XMLElement, tmxparser::TmxTileset_)':
jni/libtmx-parser/src/tmxparser.cpp:321:3: error: expected ';' before 'return'
jni/libtmx-parser/src/tmxparser.cpp:323:3: error: expected ';' before 'return'
jni/libtmx-parser/src/tmxparser.cpp:324:3: error: expected ';' before 'return'
make: *** [obj/local/armeabi-v7a/objs-debug/GameRenderer/libtmx-parser/src/tmxparser.o] Error 1
Process finished with exit code 2
Compile using NDK 10c and 10d results in the same output.
My Android.mk looks as follows:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := GameRenderer
LOCAL_SRC_FILES := libtmx-parser/libs/tinyxml2/tinyxml2.cpp libtmx-parser/src/tmxparser.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/libtmx-parser/libs/tinyxml2
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog -lGLESv2 -lOpenSLES
LOCAL_CPPFLAGS := -DANDROID -frtti -fexceptions -Wno-error=format-security -std=c++11
include $(BUILD_SHARED_LIBRARY)
I'm using version 3b98e1f on branch master of libtmx-parser.
Any ideas on what might be the problem?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.