Closed carstene1ns closed 7 years ago
This now outputs in legacy mode (linear list) like the php tool by default.
I finally want to give this tool some love (for Windows) so we can ship this together with 0.5. But I get 4 linker errors and even adding all icu libs doesn't help:
Any idea which relevant icu lib could be missing?
1>main.obj : warning LNK4217: Lokal definiertes Symbol "??3UMemory@icu_56@@SAXPEAX@Z (public: static void __cdecl icu_56::UMemory::operator delete(void *))" wurde in "public: virtual void * __cdecl icu_56::StringByteSink<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::`scalar deleting destructor'(unsigned int)" (??_G?$StringByteSink@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@icu_56@@UEAAPEAXI@Z)-Funktion importiert.
1>main.obj : warning LNK4217: Lokal definiertes Symbol "??0ByteSink@icu_56@@QEAA@XZ (public: __cdecl icu_56::ByteSink::ByteSink(void))" wurde in "public: __cdecl icu_56::StringByteSink<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::StringByteSink<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *)" (??0?$StringByteSink@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@icu_56@@QEAA@PEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)-Funktion importiert.
1>main.obj : warning LNK4217: Lokal definiertes Symbol "??1ByteSink@icu_56@@UEAA@XZ (public: virtual __cdecl icu_56::ByteSink::~ByteSink(void))" wurde in "public: virtual __cdecl icu_56::StringByteSink<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >::~StringByteSink<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(void)" (??1?$StringByteSink@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@icu_56@@UEAA@XZ)-Funktion importiert.
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: void __cdecl icu_56::UnicodeString::toUTF8(class icu_56::ByteSink &)const " (__imp_?toUTF8@UnicodeString@icu_56@@QEBAXAEAVByteSink@2@@Z)" in Funktion ""public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __cdecl icu_56::UnicodeString::toUTF8String<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)const " (??$toUTF8String@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@UnicodeString@icu_56@@QEBAAEAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@AEAV23@@Z)".
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: class icu_56::UnicodeString & __cdecl icu_56::UnicodeString::toLower(void)" (__imp_?toLower@UnicodeString@icu_56@@QEAAAEAV12@XZ)" in Funktion ""class nlohmann::basic_json<class std::map,class std::vector,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,__int64,double,class std::allocator> __cdecl parse_dir_recursive(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?parse_dir_recursive@@YA?AV?$basic_json@Vmap@std@@Vvector@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@_N_JNVallocator@2@@nlohmann@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)".
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: __cdecl icu_56::UnicodeString::UnicodeString(char const *)" (__imp_??0UnicodeString@icu_56@@QEAA@PEBD@Z)" in Funktion ""class nlohmann::basic_json<class std::map,class std::vector,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,__int64,double,class std::allocator> __cdecl parse_dir_recursive(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?parse_dir_recursive@@YA?AV?$basic_json@Vmap@std@@Vvector@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@_N_JNVallocator@2@@nlohmann@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)".
1>main.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""__declspec(dllimport) public: virtual __cdecl icu_56::UnicodeString::~UnicodeString(void)" (__imp_??1UnicodeString@icu_56@@UEAA@XZ)" in Funktion ""class nlohmann::basic_json<class std::map,class std::vector,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,bool,__int64,double,class std::allocator> __cdecl parse_dir_recursive(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,int)" (?parse_dir_recursive@@YA?AV?$basic_json@Vmap@std@@Vvector@2@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@2@_N_JNVallocator@2@@nlohmann@@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@H@Z)".
Does MSVC need some flag to compile in c++11 mode?
Nope, always compiles in the highest mode it supports (C++14 + some of C++17) and you can't disable it >.> But the dllimport is suspicious because I did a static build, hmm
These seem to come from the C++ stdlib, which could make sense as the json header adds to the STL. However, no idea why this affects ICU.
Updated the json header now as they claim to have made the MSVC support better in 2.0.0. (will squash this commit later)
My guess was correct. Removing __dllimport fixed it. So the static ICU build has a bug...
This works for Windows. Used that dirent_win.h which we already use for Player...
The code will fail when the files are not in the local codepage because using the widestring API makes everything messy. This will break the use case when somebody wants to create a cache of a japanese yume nikki on an european Windows...
https://github.com/Ghabry/easyrpg-tools/commit/54684fadb885b86df6c5ed1b620c7dccd2cbe3b8
This is now ready.