#10320 closed defect (fixed)
TOOLS: Compiler error in "extract_prince"
Reported by: | raziel- | Owned by: | wjp |
---|---|---|---|
Priority: | normal | Component: | Tools |
Version: | Keywords: | ||
Cc: | Game: |
Description
Since a source update from two or so days ago, i'm getting a compiler error in the "extract_prince" module
C++ engines/prince/extract_prince.o engines/prince/extract_prince.cpp: In member function 'virtual void ExtractPrince::execute()': engines/prince/extract_prince.cpp:166:58: error: 'to_string' is not a member of 'std' if (Common::Filename(mainDir.getFullPath() + "mob0" + std::to_string(mobFileNumber) + ".lst").exists() == true) { ^ engines/prince/extract_prince.cpp:168:58: error: 'to_string' is not a member of 'std' exportMobs(loadFile(mainDir.getFullPath() + "mob0" + std::to_string(mobFileNumber) + ".lst")); ^ engines/prince/extract_prince.cpp:173:57: error: 'to_string' is not a member of 'std' if (Common::Filename(mainDir.getFullPath() + "mob" + std::to_string(mobFileNumber) + ".lst").exists() == true) { ^ engines/prince/extract_prince.cpp:175:57: error: 'to_string' is not a member of 'std' exportMobs(loadFile(mainDir.getFullPath() + "mob" + std::to_string(mobFileNumber) + ".lst")); ^ gmake: *** [engines/prince/extract_prince.o] Error 1
Latest sources, checkout from today
AmigaOS4 - SDL - PPC - BE
gcc (adtools build 5.3.0) 5.3.0
Change History (11)
comment:1 by , 7 years ago
Owner: | set to |
---|
comment:4 by , 7 years ago
Okay, then we have to look how to get rid of the std::string stuff. I'll look into it, but it might take a while.
comment:5 by , 7 years ago
Are you sure? On snover's amigaos buildbot image (also with gcc 5.3.0), std::to_string
seems to work with -std=c++11
.
comment:6 by , 7 years ago
And otherwise, https://github.com/wjp/scummvm-tools/tree/stdstring gets rid of it.
comment:7 by , 7 years ago
@wjp
Yes, i was too fast, sorry.
I'ts not a dummy at all, but it's having issues/unimplemented features
See here for the exact problem: https://github.com/sba1/adtools/issues/19
iiuc it is still not fixed and we are waiting for a new SDK
comment:8 by , 7 years ago
Priority: | blocker → normal |
---|
Resetting priority. Tools issues are not release blockers. Thanks!
comment:9 by , 7 years ago
Incidentally there is a C++98-compatible toString implementation used in devtools:
std::string toString(int num) { std::ostringstream os; os << num; return os.str(); }
comment:10 by , 7 years ago
Owner: | changed from | to
---|---|
Resolution: | → fixed |
Status: | new → closed |
I have now merged in the changes from wjp (as well as one additional change for another c++11 use in pack_prince.cpp).
comment:11 by , 7 years ago
Thanks you, fixed in daily buillds, but they didn't make it into the 2.0 release branch, so i'm afraid there won't be a 2.0 tools release this time.
Does your compiler toolchain supports C++11? std::to_string was introduced with C++11. [source: http://de.cppreference.com/w/cpp/string/basic_string/to_string]
What happens if you add "-std=c++11" to your CXXFLAGS?