After a few weeks of trying different things, I did manage to get the
ClanLib SVN (0.7.9) version to compile using MinGW. I've found
and installed all of the required libraries for Pingus. Only by
disabling some lines in the Pingus source code could I get it to
compile. One line that I had to change was in tinygettext.cxx - I
had to change:
char* in = in_orig;
to
const char* in = in_orig;
The compiler said that iconv() had to have a const as it's second
argument. The rest of the errors after everything compiles
independently came from the linking phase. Here are the error
messages using the current SVN version of ClanLib and the SVN version
of Pingus (after changing tinygettext.cxx):
g++ -g -O2 -L/mingw/lib -L/usr/local/lib -L/usr/lib
-liconv -lintl -o pingus.exe pingus-action_button.o
pingus-action_holder.o pingus-blitter.o pingus-blitter_test.o
pingus-button_panel.o pingus-capture_rectangle.o pingus-cheat.o
pingus-client.o pingus-col_map.o pingus-config.o pingus-console.o
pingus-credits.o pingus-debug.o pingus-debug_stream.o
pingus-demo_player.o pingus-demo_recorder.o pingus-demo_session.o
pingus-direction.o pingus-exit_menu.o pingus-file_reader.o
pingus-fonts.o pingus-fps_counter.o pingus-game_counter.o
pingus-game_session.o pingus-game_session_result.o pingus-game_time.o
pingus-global_event.o pingus-globals.o pingus-goal_manager.o
pingus-graphic_context_state.o pingus-groundtype.o pingus-gui_obj.o
pingus-html_browser.o pingus-hurry_up.o pingus-layer_manager.o
pingus-loading.o pingus-menu_background.o pingus-menu_button.o
pingus-mover.o pingus-multiline_text.o pingus-path_manager.o
pingus-pingu.o pingus-pingu_action.o pingus-pingu_action_factory.o
pingus-collider.o pingus-pingu_enums.o pingus-pingu_holder.o
pingus-pingu_map.o pingus-pingus_counter.o pingus-pingus_counter_bar.o
pingus-pingus_error.o pingus-pingus_main.o pingus-pingus_map_manager.o
pingus-pingus_menu.o pingus-pingus_menu_manager.o pingus-resource.o
pingus-pingus_sub_menu.o pingus-playfield.o pingus-pingus_level.o
pingus-xml_pingus_level.o pingus-plf_res_mgr.o pingus-plt_xml.o
pingus-preview_renderer.o pingus-range.o pingus-res_descriptor.o
pingus-resource_modifier.o pingus-result_screen.o pingus-savegame.o
pingus-savegame_manager.o pingus-screenshot.o pingus-server.o
pingus-server_event.o pingus-smallmap.o pingus-smallmap_image.o
pingus-spot_map.o pingus-state_sprite.o pingus-start_screen.o
pingus-stat_manager.o pingus-story.o pingus-story_screen.o
pingus-string_format.o pingus-system.o pingus-theme.o
pingus-time_display.o pingus-timer.o pingus-gettext.o
pingus-tinygettext.o pingus-true_server.o pingus-vector.o
pingus-world.o pingus-worldobj.o pingus-worldobj_factory.o
pingus-xml_file_reader.o pingus-xml_file_writer.o pingus-xml_pdf.o
pingus-drawing_context.o pingus-scene_context.o -Lf:/mingw/lib
-lclanApp -lclanGL -lopengl32 -lglu32 -lclanSDL -lSDL
-lclanGUIStyleSilver -lclanGUI -lclanDisplay -lddraw -ldinput8 -lgdi32
-lole32 -ljpeg -lpng -lclanVorbis -lvorbis -logg -lclanMikMod -lmikmod
-lclanSound -ldsound -ldxguid -lwinmm -lclanCore -lz -lclanSignals
caimagemanipulation/libcaimagemanipulation.a
worldobjs/libpingus_worldobjs.a actions/libpingus_actions.a
movers/libpingus_movers.a colliders/libpingus_colliders.a
particles/libpingus_particle.a sound/libpingus_sound.a
worldmap/libpingus_worldmap.a gui/libpingus_gui.a
input/libpingus_input.a input/axes/libpingus_input_axes.a
input/buttons/libpingus_input_buttons.a
input/pointers/libpingus_input_pointers.a
input/scrollers/libpingus_input_scrollers.a
pingus-tinygettext.o(.text+0x8e2): In function `ZN11TinyGetText7convertERKSsS1_S1_':
f:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/bits/basic_string.h:1452:
undefined reference to `libiconv_open'
pingus-tinygettext.o(.text+0x978): In function `ZN11TinyGetText7convertERKSsS1_S1_':
f:/pingus/src/tinygettext.cxx:124: undefined reference to `libiconv'
pingus-tinygettext.o(.text+0x99b):f:/pingus/src/tinygettext.cxx:133: undefined reference to `libiconv_close'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x53): In function `ZN15CL_MutexSectionD0Ev':
f:/mingw/include/ClanLib-0.7/ClanLib/Sound/../Core/System/mutex.h:144: undefined reference to `CL_SetupSound::init(bool)'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0xe3): In function `ZN6Pingus5Sound15PingusSoundRealC1Ev':
f:/pingus/src/sound/sound_real.cxx:46: undefined reference to `CL_SetupSound::init(bool)'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x139):
In function `ZN6Pingus5Sound15PingusSoundReal15real_stop_musicEv':
f:/pingus/src/sound/sound_real.cxx:111: undefined reference to `CL_SoundBuffer_Session::stop()'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x18e): In function `ZN6Pingus5Sound15PingusSoundRealD0Ev':
f:/pingus/src/sound/sound_real.cxx:72: undefined reference to `CL_SetupSound::deinit()'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x1bd): In function `ZN6Pingus5Sound15PingusSoundRealD1Ev':
f:/pingus/src/sound/sound_real.cxx:72: undefined reference to `CL_SetupSound::deinit()'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x1ed): In function `ZN6Pingus5Sound15PingusSoundRealD2Ev':
f:/pingus/src/sound/sound_real.cxx:72: undefined reference to `CL_SetupSound::deinit()'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x256):
In function `ZN6Pingus5Sound15PingusSoundReal15real_play_soundERKSsff':
f:/pingus/src/sound/sound_real.cxx:89: undefined reference to `CL_SoundBuffer_Session::CL_SoundBuffer_Session()'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x283):f:/pingus/src/sound/sound_real.cxx:93:
undefined reference to `CL_SoundBuffer::prepare(bool, CL_SoundOutput*)'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x2b6):f:/pingus/src/sound/sound_real.cxx:93:
undefined reference to
`CL_SoundBuffer_Session::~CL_SoundBuffer_Session()'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x2cf):f:/pingus/src/sound/sound_real.cxx:100:
undefined reference to `CL_SoundBuffer_Session::set_volume(float)'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x2e1):f:/pingus/src/sound/sound_real.cxx:101:
undefined reference to `CL_SoundBuffer_Session::set_pan(float)'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x2f2):f:/pingus/src/sound/sound_real.cxx:102:
undefined reference to `CL_SoundBuffer_Session::set_looping(bool)'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x2fd):f:/pingus/src/sound/sound_real.cxx:103:
undefined reference to `CL_SoundBuffer_Session::play()'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x30f):f:/pingus/src/sound/sound_real.cxx:103:
undefined reference to
`CL_SoundBuffer_Session::~CL_SoundBuffer_Session()'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x37e):f:/pingus/src/sound/sound_real.cxx:103:
undefined reference to
`CL_SoundBuffer_Session::~CL_SoundBuffer_Session()'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0x3bd):f:/pingus/src/sound/sound_real.cxx:93:
undefined reference to
`CL_SoundBuffer_Session::~CL_SoundBuffer_Session()'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0xc7b):
In function `ZN6Pingus5Sound15PingusSoundReal15real_play_musicERKSsf':
f:/pingus/src/sound/sound_real.cxx:158: undefined reference to `CL_SoundBuffer::prepare(bool, CL_SoundOutput*)'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0xcb0):f:/pingus/src/sound/sound_real.cxx:159:
undefined reference to `CL_SoundBuffer_Session::set_volume(float)'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0xcc7):f:/pingus/src/sound/sound_real.cxx:160:
undefined reference to `CL_SoundBuffer_Session::set_looping(bool)'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0xcd8):f:/pingus/src/sound/sound_real.cxx:161:
undefined reference to `CL_SoundBuffer_Session::play()'
sound/libpingus_sound.a(libpingus_sound_a-sound_real.o)(.text+0xdb5):
In function `ZN6Pingus5Sound15PingusSoundReal15real_play_musicERKSsf':
f:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/ext/new_allocator.h:62:
undefined reference to `CL_SoundBuffer::CL_SoundBuffer(std::string
const&, bool, std::string const&)'
sound/libpingus_sound.a(libpingus_sound_a-sound_res_mgr.o)(.text+0x1fa): In function `ZN6Pingus11SoundResMgr4loadERKSs':
f:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../../include/c++/3.4.2/ext/new_allocator.h:62:
undefined reference to `CL_SoundBuffer::CL_SoundBuffer(std::string
const&, bool, std::string const&)'
input/axes/libpingus_input_axes.a(libpingus_input_axes_a-joystick_axis.o)(.text+0x31):
In function `ZN6Pingus5Input4Axes12JoystickAxis6updateEf':
f:/pingus/src/input/axes/joystick_axis.cxx:61: undefined reference to `CL_Joystick::get_device(int)'
input/axes/libpingus_input_axes.a(libpingus_input_axes_a-joystick_axis.o)(.text+0xc2):
In function `ZN6Pingus5Input4Axes12JoystickAxisC1Eiif':
f:/pingus/src/input/axes/joystick_axis.cxx:34: undefined reference to `CL_Joystick::get_device_count()'
input/axes/libpingus_input_axes.a(libpingus_input_axes_a-joystick_axis.o)(.text+0x134):f:/pingus/src/input/axes/joystick_axis.cxx:37:
undefined reference to `CL_Joystick::get_device(int)'
input/axes/libpingus_input_axes.a(libpingus_input_axes_a-joystick_axis.o)(.text+0x4a2):
In function `ZN6Pingus5Input4Axes12JoystickAxisC2Eiif':
f:/pingus/src/input/axes/joystick_axis.cxx:34: undefined reference to `CL_Joystick::get_device_count()'
input/axes/libpingus_input_axes.a(libpingus_input_axes_a-joystick_axis.o)(.text+0x514):f:/pingus/src/input/axes/joystick_axis.cxx:37:
undefined reference to `CL_Joystick::get_device(int)'
input/buttons/libpingus_input_buttons.a(libpingus_input_buttons_a-joystick_button.o)(.text+0x21):
In function `ZNK6Pingus5Input7Buttons14JoystickButton10is_pressedEv':
f:/pingus/src/input/buttons/joystick_button.cxx:48: undefined reference to `CL_Joystick::get_device(int)'
input/buttons/libpingus_input_buttons.a(libpingus_input_buttons_a-joystick_button.o)(.text+0x16b):
In function `ZN6Pingus5Input7Buttons14JoystickButtonC1Eii':
f:/pingus/src/input/buttons/joystick_button.cxx:33: undefined reference to `CL_Joystick::get_device_count()'
input/buttons/libpingus_input_buttons.a(libpingus_input_buttons_a-joystick_button.o)(.text+0x381):f:/pingus/src/input/buttons/joystick_button.cxx:36:
undefined reference to `CL_Joystick::get_device(int)'
input/buttons/libpingus_input_buttons.a(libpingus_input_buttons_a-joystick_button.o)(.text+0xecb):
In function `ZN6Pingus5Input7Buttons14JoystickButtonC2Eii':
f:/pingus/src/input/buttons/joystick_button.cxx:33: undefined reference to `CL_Joystick::get_device_count()'
input/buttons/libpingus_input_buttons.a(libpingus_input_buttons_a-joystick_button.o)(.text+0x10e1):f:/pingus/src/input/buttons/joystick_button.cxx:36:
undefined reference to `CL_Joystick::get_device(int)'
collect2: ld returned 1 exit status
I've attached the patch that I used to get everything to link
correctly, but it disables sound and joystick use. Also, it takes
the guts out of tinygettext.cxx because it flat out wouldn't link
against libiconv, so I just made tinygettext useless, basically.
Is the TODO page correct on the website? The "date last updated"
says 2002, so I don't know where to begin on helping out with coding
this game.