Opened 6 years ago

Closed 6 years ago

Last modified 15 months ago

#6516 closed defect

ScummVM-Tools: Compile error with C++98

Reported by: Kirben Owned by: SF/mthreepwood
Priority: high Component: Tools
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, 6 years ago

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

comment:2 by SF/mthreepwood, 6 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, 6 years ago

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

comment:4 by SF/mthreepwood, 6 years ago

Does it compile if you include ?

comment:5 by SF/mthreepwood, 6 years ago

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

comment:6 by Kirben, 6 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::iterator, std::basic_string::iterat or, std::basic_string::iterator, )' engines/sword1/compress_sword1.cpp:759:80: note: candidates are: f:\mingw\bin../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h:4871:5: note: template _OIter std::transfor m(_IIter, _IIter, _OIter, _UnaryOperation) f:\mingw\bin../lib/gcc/mingw32/4.6.2/include/c++/bits/stl_algo.h:4907:5: note: template _OI ter std::transform(_IIter1, _IIter1, _IIter2, _OIter, _BinaryOperation) make: *** [engines/sword1/compress_sword1.o] Error 1

comment:7 by SF/mthreepwood, 6 years ago

I guess is needed too for std::tolower.

comment:8 by Kirben, 6 years ago

No difference, when including locale.

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

comment:9 by SF/mthreepwood, 6 years ago

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

comment:10 by digitall, 15 months ago

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