Opened 19 months ago

Closed 17 months ago

Last modified 17 months ago

#10320 closed defect (fixed)

TOOLS: Compiler error in "extract_prince"

Reported by: raziel- Owned by: wjp
Priority: normal Component: Tools
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 Changed 19 months ago by rootfather

Owner: set to rootfather

comment:2 Changed 19 months ago by rootfather

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?

Last edited 19 months ago by rootfather (previous) (diff)

comment:3 Changed 19 months ago by raziel-

Nope, c++11 is a dummy on my platform.

comment:4 Changed 19 months ago by rootfather

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 Changed 18 months ago by wjp

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:7 Changed 18 months ago by raziel-

@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 Changed 18 months ago by csnover

Priority: blockernormal

Resetting priority. Tools issues are not release blockers. Thanks!

comment:9 Changed 18 months ago by csnover

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 Changed 17 months ago by criezy

Owner: changed from rootfather to wjp
Resolution: fixed
Status: newclosed

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 Changed 17 months ago by raziel-

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.

Note: See TracTickets for help on using tickets.