Compiling old Opensource Megamania game with LibSDL 1.2 and Codeblocks

Hi Hello

I don’t know if you are still support SDL 1.2, but I am to compile an old code of Megamania game (go here it is a project in GitHub which name is Cossack-mega mania-clone), I am using Name : Code::Blocks Version : svn-r13046 SDK Version : 2.23.0) and I am using the old version of SDL 1.2 because the code of the game is 2009. It seems to the code compile well, but I do have this error message :

||=== Build finished: 2 error(s), 1614 warning(s) (0 minute(s), 24 second(s)) ===|
log.cpp|29|error: use of undeclared identifier ‘Log’|
log.cpp|29|error: no type named ‘string’ in namespace ‘std’|

Do you know what this means or what it is the error message ?

My guess for the second error would be that nobody used #include <string> in the log.cpp file. I don’t know if fixing this would then fix the first issue or not.

I could not find the source that you’re referencing… Could you copy the link and post it so we can all check it out?

Hi Hello

Thanks so much for your soon answer, here’s the link of the project with all the source code :

I hope this will help,also I added the string as you said but it just fix one error this is the second error :

error: use of undeclared identifier ‘Log’

If you look at an earlier version of log.h you’ll see that it contains the class definition of Log.
Some big changes to log.h seem to have been made in commit f6560d4. After that there is no definition of class Log but the definition of Log::LogMSG is still in log.cpp and this seems to be what’s causing the error.

I don’t see how the latest version of the code at that repository could compile. Maybe it will work if you simply remove Log::LogMSG (i.e. line 29-50 in log.cpp). Otherwise you might want to try and revert to an older version.