Opened 11 years ago

Closed 11 years ago

Last modified 6 years ago

#6516 closed defect

ScummVM-Tools: Compile error with C++98

Reported by: Kirben Owned by: SF/mthreepwood
Priority: high Component: Tools
Version: Keywords:
Cc: Game:

Description

I'm getting these errors when trying to compile the current ScummVM Tools GiT: engines/sword1/compress_sword1.cpp: In member function 'virtual void CompressSwo rd1::execute()': engines/sword1/compress_sword1.cpp:751:8: error: 'std::string' has no member nam ed 'pop_back' engines/sword1/compress_sword1.cpp:757:4: error: 'transform' is not a member of 'std'

I'm using GCC 4.6.2 under MinGW.

Ticket imported from: bugs/6516.

Change History (10)

comment:1 by SF/mthreepwood, 11 years ago

I fixed it in revision 60b856b. Looks like criezy used an evil C++11 function.

comment:2 by SF/mthreepwood, 11 years ago

Owner: set to SF/mthreepwood
Status: newclosed
Summary: ScummVM-Tools: Compile error under MingwScummVM-Tools: Compile error with C++98

comment:3 by Kirben, 11 years ago

The first error is fixed, but the second error (transform) still occurs.

comment:4 by SF/mthreepwood, 11 years ago

Does it compile if you include

comment:5 by SF/mthreepwood, 11 years ago

Oh, I absolutely hate this bug tracker. It removed my <algorithm>.

comment:6 by Kirben, 11 years ago

No, that causes a different error: engines/sword1/compress_sword1.cpp: In member function 'virtual void CompressSwo rd1::execute()': engines/sword1/compress_sword1.cpp:759:80: error: no matching function for call to 'transform(std::basic_string

comment:7 by SF/mthreepwood, 11 years ago

I guess <locale> is needed too for std::tolower.

comment:8 by Kirben, 11 years ago

No difference, when including locale.

Using 'tolower' instead of 'std::tolower' works though.

comment:9 by SF/mthreepwood, 11 years ago

Ah, good call. We're using the C version there. Pushed.

comment:10 by digitall, 6 years ago

Component: Tools
Note: See TracTickets for help on using tickets.