Author Topic: Another "OHNOES I CAN'T COMPILE IT" thread =P  (Read 7861 times)

Offline 4matsy

  • Regular
  • *****
  • Posts: 169
Another "OHNOES I CAN'T COMPILE IT" thread =P
« on: May 13, 2006, 04:05:10 AM »
Okay, so I got the sudden urge to check out the source code and see what's new so far. (Yeah, I'm impatient. Sue me. :P)

Almost made it, but unfortunately this somewhat strange-looking error popped up:

Code: [Select]
Project   : SDL Application
Compiler  : GNU GCC Compiler (called directly)
Directory : C:gamesmariosupermariowar_source
--------------------------------------------------------------------------------
Switching to target: default
Compiling: smw_srcHashTable.cpp
Compiling: smw_srcMapList.cpp
smw/_src/MapList.cpp: In member function `std::string
   MapList::stripCreatorAndDotMap(const std::string&)':
smw/_src/MapList.cpp:253: warning: comparison between signed and unsigned
   integer expressions
Compiling: smw_srcSFont.c
Compiling: smw_srcdirlist.cpp
Compiling: smw_srceyecandy.cpp
Compiling: smw_srcgamemodes.cpp
smw/_src/gamemodes.cpp:1915:2: warning: no newline at end of file
Compiling: smw_srcgfx.cpp
smw/_src/gfx.cpp:14: warning: ignoring #pragma comment
smw/_src/gfx.cpp:15: warning: ignoring #pragma comment
Compiling: smw_srcglobal.cpp
Compiling: smw_srciconsleveleditor_icon.rc
windres.exe: invalid option -- J
Usage: windres.exe [option(s)] [input-file] [output-file]
 The options are:
  -i --input=<file>            Name input file
  -o --output=<file>           Name output file
  -I --input-format=<format>   Specify input format
  -O --output-format=<format>  Specify output format
  -F --target=<target>         Specify COFF target
     --preprocessor=<program>  Program to use to preprocess rc file
     --include-dir=<dir>       Include directory when preprocessing rc file
  -D --define <sym>[=<val>]    Define SYM when preprocessing rc file
  -v --verbose                 Verbose - tells you what it's doing
     --language=<val>          Set language when reading rc file
     --use-temp-file           Use a temporary file instead of popen to read
                               the preprocessor output
     --no-use-temp-file        Use popen (default)
  -h --help                    Print this help message
  -V --version                 Print version information
FORMAT is one of rc, res, or coff, and is deduced from the file name
extension if not specified.  A single file name is an input file.
No input-file is stdin, default rc.  No output-file is stdout, default rc.
windres.exe: supported targets: pe-i386 pei-i386 elf32-i386 elf32-little elf32-big srec symbolsrec tekhex binary ihex
Process terminated with status 1 (0 minutes, 9 seconds)
2 errors, 4 warnings
 



Anyone have any ideas as to what went wrong? 'Cause I sure don't...:lol:

(Well, actually, one idea: I checked this out from the CVS HEAD about 2 hours ago. I dunno if this is simply the current (uncompilable) state of the code, or if I genuinely did do something wrong...:?)
« Last Edit: December 31, 1969, 07:00:00 PM by 4matsy »
:D

Offline Two52

  • Administrator
  • Posts Very Often
  • *
  • Posts: 1890
(No subject)
« Reply #1 on: May 13, 2006, 01:55:21 PM »
Well, I fixed a couple of those warnings and checked them in.  Also the HEAD revision is stable and should be compilable.  The problem in the output you posted is that the -J option is not recognized.  Unfortunately, I'm not familiar with the Unix compile script, so Unix guys, please chime in.
« Last Edit: December 31, 1969, 07:00:00 PM by Two52 »

Offline 4matsy

  • Regular
  • *****
  • Posts: 169
(No subject)
« Reply #2 on: May 14, 2006, 12:24:40 AM »
Okay...

I got a newer version of windres.exe (the one I had was from back in 2003...D'OH! :x), and tried importing the .sln project file into Code::Blocks.

Went pretty well, with only a minor stumbling block:

Code: [Select]
Project   : SuperMarioWar_console
Compiler  : GNU GCC Compiler (called directly)
Directory : C:gamesmariosupermariowar_sourcesmwProjectsPC
--------------------------------------------------------------------------------
Switching to target: Debug
Compiling: ...._srcHashTable.cpp
Compiling: ...._srcMapList.cpp
Compiling: ...._srcSFont.c
Compiling: ...._srcdirlist.cpp
Compiling: ...._srceyecandy.cpp
Compiling: ...._srcgamemodes.cpp
../../_src/gamemodes.cpp: In member function `virtual bool
   CGM_Coins::playerkilledplayer(CPlayer&, CPlayer&)':
../../_src/gamemodes.cpp:930: warning: unused parameter `CPlayer&inflictor'
../../_src/gamemodes.cpp:930: warning: unused parameter `CPlayer&other'
../../_src/gamemodes.cpp: In member function `virtual bool
   CGM_Eggs::playerkilledplayer(CPlayer&, CPlayer&)':
../../_src/gamemodes.cpp:1010: warning: unused parameter `CPlayer&inflictor'
../../_src/gamemodes.cpp:1010: warning: unused parameter `CPlayer&other'
../../_src/gamemodes.cpp: In member function `virtual bool
   CGM_Domination::playerkilledplayer(CPlayer&, CPlayer&)':
../../_src/gamemodes.cpp:1250: warning: unused parameter `CPlayer&inflictor'
../../_src/gamemodes.cpp: In member function `virtual bool
   CGM_Race::playerkilledplayer(CPlayer&, CPlayer&)':
../../_src/gamemodes.cpp:1622: warning: unused parameter `CPlayer&inflictor'
../../_src/gamemodes.cpp: In member function `virtual void
   CGM_Race::playerextraguy(CPlayer&, short int)':
../../_src/gamemodes.cpp:1642: warning: unused parameter `short int iType'
../../_src/gamemodes.cpp: In member function `virtual bool
   CGM_Ztar::playerkilledplayer(CPlayer&, CPlayer&)':
../../_src/gamemodes.cpp:1805: warning: unused parameter `CPlayer&inflictor'
../../_src/gamemodes.cpp:1805: warning: unused parameter `CPlayer&other'
../../_src/gamemodes.cpp: In member function `virtual void
   CGM_Ztar::playerextraguy(CPlayer&, short int)':
../../_src/gamemodes.cpp:1815: warning: unused parameter `short int iType'
../../_src/gamemodes.cpp: In member function `virtual bool
   CGM_CaptureTheFlag::playerkilledplayer(CPlayer&, CPlayer&)':
../../_src/gamemodes.cpp:1877: warning: unused parameter `CPlayer&inflictor'
../../_src/gamemodes.cpp:1877: warning: unused parameter `CPlayer&other'
../../_src/gamemodes.h: In member function `virtual bool
   CGameMode::CheckWinner(CPlayer&)':
../../_src/gamemodes.h:44: warning: unused parameter `CPlayer&player'
Compiling: ...._srcgfx.cpp
../../_src/gfx.cpp:14: warning: ignoring #pragma comment
../../_src/gfx.cpp:15: warning: ignoring #pragma comment
Compiling: ...._srcglobal.cpp
Compiling: ...._srcinput.cpp
Compiling: ...._srcmain.cpp
../../_src/main.cpp:76: warning: ignoring #pragma comment
../../_src/main.cpp:77: warning: ignoring #pragma comment
../../_src/main.cpp:78: warning: ignoring #pragma comment
../../_src/main.cpp: In function `int SDL_main(int, char**)':
../../_src/main.cpp:532: warning: unused parameter `int argc'
../../_src/main.cpp:532: warning: unused parameter `char**argv'
../../_src/main.cpp: In function `void RunGame()':
../../_src/main.cpp:917: ISO C++ forbids declaration of `exitgametimer' with no
   type
Process terminated with status 1 (0 minutes, 11 seconds)
1 errors, 20 warnings
 

"Well, that should be simple", I thought. I just changed it to "static int exitgametimer", since the highest value I ever saw it checked for was 8000. :P

Next attempt, the compilation went swimmingly, but the linking failed big-time. Now I'm stumped again:

Code: [Select]
Project   : SuperMarioWar_console
Compiler  : GNU GCC Compiler (called directly)
Directory : C:gamesmariosupermariowar_sourcesmwProjectsPC
--------------------------------------------------------------------------------
Switching to target: Debug
Compiling: ...._srcmain.cpp
../../_src/main.cpp:76: warning: ignoring #pragma comment
../../_src/main.cpp:77: warning: ignoring #pragma comment
../../_src/main.cpp:78: warning: ignoring #pragma comment
../../_src/main.cpp: In function `int SDL_main(int, char**)':
../../_src/main.cpp:532: warning: unused parameter `int argc'
../../_src/main.cpp:532: warning: unused parameter `char**argv'
Compiling: ...._srcmap.cpp
Compiling: ...._srcmenu.cpp
Compiling: ...._srcmovingplatform.cpp
../../_src/movingplatform.cpp:1219:2: warning: no newline at end of file
Compiling: ...._srcobject.cpp
../../_src/object.cpp: In member function `virtual bool
   B_SwitchBlock::hitbottom(CPlayer*, bool)':
../../_src/object.cpp:1366: warning: unused parameter `bool useBehavior'
../../_src/object.cpp: In member function `virtual bool
   B_SwitchBlock::hitright(CPlayer*, bool)':
../../_src/object.cpp:1374: warning: unused parameter `bool useBehavior'
../../_src/object.cpp: In member function `virtual bool
   B_SwitchBlock::hitleft(CPlayer*, bool)':
../../_src/object.cpp:1385: warning: unused parameter `bool useBehavior'
../../_src/object.cpp: In member function `virtual void
   IO_MovingObject::collide(CPlayer*)':
../../_src/object.cpp:1775: warning: unused parameter `CPlayer*player'
../../_src/object.cpp: In member function `virtual void
   MO_Powerup::collide(CPlayer*)':
../../_src/object.cpp:2255: warning: unused parameter `CPlayer*player'
../../_src/object.cpp: In member function
   `PU_FirePowerup::PU_FirePowerup(gfxSprite*, short int, short int, short int,
   bool, short int, short int, short int, short int, short int)':
../../_src/object.cpp:2348: warning: unused parameter `bool moveToRight'
../../_src/object.cpp: In member function
   `PU_HammerPowerup::PU_HammerPowerup(gfxSprite*, short int, short int, short
   int, bool, short int, short int, short int, short int, short int)':
../../_src/object.cpp:2366: warning: unused parameter `bool moveToRight'
../../_src/object.cpp: In member function
   `PU_ClockPowerup::PU_ClockPowerup(gfxSprite*, short int, short int, short
   int, bool, short int, short int, short int, short int, short int)':
../../_src/object.cpp:2383: warning: unused parameter `bool moveToRight'
../../_src/object.cpp: In member function
   `PU_BobombPowerup::PU_BobombPowerup(gfxSprite*, short int, short int, short
   int, bool, short int, short int, short int, short int, short int)':
../../_src/object.cpp:2400: warning: unused parameter `bool moveToRight'
../../_src/object.cpp: In member function
   `PU_PowPowerup::PU_PowPowerup(gfxSprite*, short int, short int, short int,
   bool, short int, short int, short int, short int, short int)':
../../_src/object.cpp:2427: warning: unused parameter `bool moveToRight'
../../_src/object.cpp: In member function
   `PU_ModPowerup::PU_ModPowerup(gfxSprite*, short int, short int, short int,
   bool, short int, short int, short int, short int, short int)':
../../_src/object.cpp:2444: warning: unused parameter `bool moveToRight'
../../_src/object.cpp: In member function
   `PU_BulletBillPowerup::PU_BulletBillPowerup(gfxSprite*, short int, short
   int, short int, bool, short int, short int, short int, short int, short
   int)':
../../_src/object.cpp:2461: warning: unused parameter `bool moveToRight'
../../_src/object.cpp: In member function
   `PU_FeatherPowerup::PU_FeatherPowerup(gfxSprite*, short int, short int,
   short int, bool, short int, short int, short int, short int, short int)':
../../_src/object.cpp:2478: warning: unused parameter `bool moveToRight'
../../_src/object.h: In member function `virtual void
   CObject::collide(CPlayer*)':
../../_src/object.h:16: warning: unused parameter `CPlayer*player'
../../_src/object.h: In member function `virtual void
   CObject::collide(IO_MovingObject*)':
../../_src/object.h:17: warning: unused parameter `IO_MovingObject*object'
../../_src/object.h: In member function `virtual void
   IO_MovingObject::collide(IO_MovingObject*)':
../../_src/object.h:312: warning: unused parameter `IO_MovingObject*object'
../../_src/object.h: In member function `virtual void
   IO_OverMapObject::collide(CPlayer*)':
../../_src/object.h:548: warning: unused parameter `CPlayer*player'
../../_src/object.h: In member function `virtual void
   IO_OverMapObject::collide(IO_MovingObject*)':
../../_src/object.h:549: warning: unused parameter `IO_MovingObject*object'
../../_src/object.h: In member function `virtual void
   MO_CarriedObject::collide(CPlayer*)':
../../_src/object.h:589: warning: unused parameter `CPlayer*player'
Compiling: ...._srcpath.cpp
Compiling: ...._srcplayer.cpp
../../_src/player.cpp: In member function `void CPlayer::draw()':
../../_src/player.cpp:2058: warning: unused variable `bool ztar'
Compiling: ...._srcsfx.cpp
../../_src/sfx.cpp:8: warning: ignoring #pragma comment
Compiling: ...._srcsplash.cpp
Compiling: ...._srcteam.cpp
../../_src/team.cpp: In member function `short int CTeamSet::LookupTeamID(short
   int)':
../../_src/team.cpp:78: warning: unused parameter `short int iPlayerID'
Compiling: ...._srcuicontrol.cpp
../../_src/uicontrol.cpp: In member function `virtual MenuCodeEnum
   MI_InputControlField::SendInput(CPlayerInput*)':
../../_src/uicontrol.cpp:628: warning: unused parameter `
   CPlayerInput*playerInput'
../../_src/uicontrol.cpp: In member function `virtual MenuCodeEnum
   MI_Button::Modify(bool)':
../../_src/uicontrol.cpp:2120: warning: unused parameter `bool fModify'
../../_src/uicontrol.cpp: In member function `virtual MenuCodeEnum
   MI_Button::SendInput(CPlayerInput*)':
../../_src/uicontrol.cpp:2125: warning: unused parameter `
   CPlayerInput*playerInput'
../../_src/uicontrol.h: In member function `virtual MenuCodeEnum
   UI_Control::SendInput(CPlayerInput*)':
../../_src/uicontrol.h:18: warning: unused parameter `CPlayerInput*playerInput'
Compiling: ...._srcuimenu.cpp
Linking console executable: ....SuperMarioWar_console.exe
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_systimer.o)(.text+0x15): In function `SDL_StartTicks':
/home/hercules/public_cvs/SDL12/src/timer/SDL_systimer.c:73: undefined reference to `timeBeginPeriod@4'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_systimer.o)(.text+0x1d):/home/hercules/public_cvs/SDL12/src/timer/SDL_systimer.c:74: undefined reference to `timeGetTime@0'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_systimer.o)(.text+0xc1): In function `SDL_GetTicks':
/home/hercules/public_cvs/SDL12/src/timer/SDL_systimer.c:101: undefined reference to `timeGetTime@0'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_systimer.o)(.text+0x12e): In function `SDL_SYS_TimerInit':
/home/hercules/public_cvs/SDL12/src/timer/SDL_systimer.c:189: undefined reference to `timeBeginPeriod@4'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_systimer.o)(.text+0x162):/home/hercules/public_cvs/SDL12/src/timer/SDL_systimer.c:195: undefined reference to `timeSetEvent@20'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_systimer.o)(.text+0x1c7): In function `SDL_SYS_TimerQuit':
/home/hercules/public_cvs/SDL12/src/timer/SDL_systimer.c:208: undefined reference to `timeEndPeriod@4'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_systimer.o)(.text+0x1d4):/home/hercules/public_cvs/SDL12/src/timer/SDL_systimer.c:206: undefined reference to `timeKillEvent@4'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_systimer.o)(.text+0x1e3):/home/hercules/public_cvs/SDL12/src/timer/SDL_systimer.c:208: undefined reference to `timeEndPeriod@4'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.text+0x12c): In function `DX5_Available':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:487: undefined reference to `IID_IDirectDrawSurface3'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.text+0xc74): In function `DX5_VideoInit':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:915: undefined reference to `IID_IDirectDraw2'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.text+0xcc7):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:925: undefined reference to `GetDeviceCaps@8'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.text+0xcdd):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:925: undefined reference to `GetDeviceCaps@8'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.text+0x11a6): In function `DX5_AllocDDSurface':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:1672: undefined reference to `IID_IDirectDrawSurface3'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.text+0x1672): In function `DX5_SetVideoMode':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:1320: undefined reference to `IID_IDirectDrawSurface3'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.text+0x300d): In function `DX5_SetGammaRamp':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:2268: undefined reference to `IID_IDirectDrawGammaControl'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.text+0x318b): In function `DX5_GetGammaRamp':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:2314: undefined reference to `IID_IDirectDrawGammaControl'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.text+0x3505): In function `DX5_PaletteChanged':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:2451: undefined reference to `GetSystemPaletteEntries@16'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x20): In function `DX5_Available':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:460: undefined reference to `GUID_XAxis'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x30):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:462: undefined reference to `GUID_YAxis'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x40):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:465: undefined reference to `GUID_ZAxis'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x50):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:466: undefined reference to `GUID_RxAxis'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x60):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:471: undefined reference to `GUID_RyAxis'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x70):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:472: undefined reference to `GUID_RzAxis'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x80):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:472: undefined reference to `GUID_Slider'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x90):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:472: undefined reference to `GUID_Slider'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0xa0):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:474: undefined reference to `GUID_POV'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0xb0):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:474: undefined reference to `GUID_POV'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0xc0):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:481: undefined reference to `GUID_POV'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0xd0):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:481: undefined reference to `GUID_POV'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x2e0): In function `DX5_CreateDevice':
/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:532: undefined reference to `GUID_XAxis'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x2f0):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:533: undefined reference to `GUID_YAxis'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x300):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:537: undefined reference to `GUID_ZAxis'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x360):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:577: undefined reference to `GUID_Key'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x370):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:579: undefined reference to `GUID_Key'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x380):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:582: undefined reference to `GUID_Key'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x390):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:582: undefined reference to `GUID_Key'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x3a0):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:588: undefined reference to `GUID_Key'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dx5video.o)(.data+0x3b0):/home/hercules/public_cvs/SDL12/src/video/windx5/SDL_dx5video.c:589: more undefined references to `GUID_Key' follow
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dibvideo.o)(.text+0x356): In function `DIB_CreatePalette':
/home/hercules/public_cvs/SDL12/src/video/windib/SDL_dibvideo.c:281: undefined reference to `GetSystemPaletteEntries@16'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dibvideo.o)(.text+0x375):/home/hercules/public_cvs/SDL12/src/video/windib/SDL_dibvideo.c:283: undefined reference to `CreatePalette@4'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dibvideo.o)(.text+0x444): In function `DIB_SussScreenDepth':
/home/hercules/public_cvs/SDL12/src/video/windib/SDL_dibvideo.c:417: undefined reference to `CreateCompatibleBitmap@12'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dibvideo.o)(.text+0x477):/home/hercules/public_cvs/SDL12/src/video/windib/SDL_dibvideo.c:423: undefined reference to `GetDIBits@28'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dibvideo.o)(.text+0x4a3):/home/hercules/public_cvs/SDL12/src/video/windib/SDL_dibvideo.c:424: undefined reference to `GetDIBits@28'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dibvideo.o)(.text+0x4ae):/home/hercules/public_cvs/SDL12/src/video/windib/SDL_dibvideo.c:425: undefined reference to `DeleteObject@4'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dibvideo.o)(.text+0x7ec): In function `DIB_SetVideoMode':
/home/hercules/public_cvs/SDL12/src/video/windib/SDL_dibvideo.c:654: undefined reference to `CreateDIBSection@24'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dibvideo.o)(.text+0x8b5):/home/hercules/public_cvs/SDL12/src/video/windib/SDL_dibvideo.c:560: undefined reference to `DeleteObject@4'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dibvideo.o)(.text+0x8f4):/home/hercules/public_cvs/SDL12/src/video/windib/SDL_dibvideo.c:604: undefined reference to `DeleteObject@4'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dibvideo.o)(.text+0xe2a): In function `DIB_NormalUpdate':
/home/hercules/public_cvs/SDL12/src/video/windib/SDL_dibvideo.c:768: undefined reference to `CreateCompatibleDC@4'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dibvideo.o)(.text+0xe43):/home/hercules/public_cvs/SDL12/src/video/windib/SDL_dibvideo.c:769: undefined reference to `SelectObject@8'
..............cppsdlSDL-1.2.9liblibSDL.a(SDL_dibvideo.o)(.text+0xe9e):/home/hercules/public_cvs/SDL12/src/video/windib/SDL_dibvideo.c:771: undefined reference to `BitBlt@36'
Process terminated with status 1 (0 minutes, 23 seconds)
52 errors, 32 warnings
 

« Last Edit: December 31, 1969, 07:00:00 PM by 4matsy »
:D

Offline Two52

  • Administrator
  • Posts Very Often
  • *
  • Posts: 1890
(No subject)
« Reply #3 on: May 14, 2006, 12:51:59 AM »
I cleaned up some more of those warnings.  The link errors you're getting are issues with SDL, not the SMW code.  I would say get the latest version of SDL, but it looks like you're already using 1.2.9.

Maybe check to make sure your lib and include directories point to the right places.  Also, SMW only uses SDL and SDL_Mixer.  Maybe remove references to SDL_net and SDL_image if you have them.  Also make sure your references to SDL are at the top of your references lists.
« Last Edit: December 31, 1969, 07:00:00 PM by Two52 »

Offline Anonymous

  • On the Bright Side: You came close to your record for damage healed as Medic
  • *
  • Posts: 3712
(No subject)
« Reply #4 on: May 15, 2006, 03:59:32 AM »
Yeah, I had suspected as much. :P So I tried something I'd thought of before but apparently forgotten. :roll:

In Code::Blocks' list of libraries to link, I'd typed in full paths and filenames; I changed them to the same style normally used on the command line (no path, just the filename, and with the "lib" prefix and the ".a" extension chopped off), and that finally got the source to compile. Yay! :mrgreen:

...Well, the console version of the game itself, anyway. The editor and non-console version of the game--more specifically, the .rc resource files--were still giving me a bit of lip:

Code: [Select]
../../_src/icons/smw_icon.rc:10:20: afxres.h: No such file or directory

I searched the SMW source directories, then my entire computer, and found no trace of this "afxres.h".

Some google searching revealed that afxres.h is part of some standard Microsoft development libraries (MFC) that come with certain versions of Visual C, and the include line is added automatically by some sort of auto-resource script-generating "app wizard" thingy. So, naturally, if you don't have MFC (or, as in my case, VC period) installed, you get this error. Yuck.

Some more googling said that the problem could be gotten around by going into the .rc file and changing both afxres.h instances to winres.h or winresrc.h (dunno the difference between these two, but apparently they're more common across different compilers), or by simply removing or commenting out the afxres.h include and the LANGUAGE lines.

Both methods worked for me, and both versions of the game compile now. :)

The level editor is now giving me a totally different error though. Go figure. :lol:

Code: [Select]
../../_src/leveleditor.cpp: In function `int editor_platforms()':
../../_src/leveleditor.cpp:1436: name lookup of `iPlatform' changed for new ISO
   `for' scoping
../../_src/leveleditor.cpp:1419:   using obsolete binding at `iPlatform'
Process terminated with status 1 (0 minutes, 8 seconds)
2 errors, 7 warnings
 


*/me googles again*

Hmm...seems that the ISO standard changed the scoping rules recently. :x

http://68.209.206.234/ProblemSolutions/ ... scope.html says:
"The problem is that under new scoping rules the local automatic variable i is limited to the for loop and cannot be accessed outside the loop."

Meaning, that iPlatform variable doesn't exist anymore by the time line 1436 rolls around, since it was declared inside the for loop on line 1419...:?
« Last Edit: December 31, 1969, 07:00:00 PM by Anonymous »

Offline 4matsy

  • Regular
  • *****
  • Posts: 169
(No subject)
« Reply #5 on: May 15, 2006, 04:02:21 AM »
(Well, that's odd. I thought I checked the "log me in automatically each visit" box...<_<')
« Last Edit: December 31, 1969, 07:00:00 PM by 4matsy »
:D

Offline Two52

  • Administrator
  • Posts Very Often
  • *
  • Posts: 1890
(No subject)
« Reply #6 on: May 15, 2006, 02:42:08 PM »
I checked in a fix for that level editor problem you found.  That was a bug.  It was working just by luck.

Thanks for being such a good detective in figuring out those compile problems you ran into.  I wonder if the other members that compiled for linux have seen this afxres.h issue before.  Unfortunately, I don't have a linux machine to compile this on before checking code in.
« Last Edit: December 31, 1969, 07:00:00 PM by Two52 »

Offline 4matsy

  • Regular
  • *****
  • Posts: 169
(No subject)
« Reply #7 on: May 15, 2006, 10:42:24 PM »
Uh...now nothing compiles. :shock:

...Same error, actually. Just in a different place. :lol:

Code: [Select]
../../_src/map.cpp: In member function `void CMap::loadMap(const std::string&, 
   bool)':
../../_src/map.cpp:598: name lookup of `m' changed for new ISO `for' scoping
../../_src/map.cpp:583:   using obsolete binding at `m'
« Last Edit: December 31, 1969, 07:00:00 PM by 4matsy »
:D

Offline 4matsy

  • Regular
  • *****
  • Posts: 169
(No subject)
« Reply #8 on: May 15, 2006, 10:42:57 PM »
(Note to self: in the future, don't hit the browser's "reload" button on the "Your message was posted successfully" screen. Heh. :P)
« Last Edit: December 31, 1969, 07:00:00 PM by 4matsy »
:D

Offline Two52

  • Administrator
  • Posts Very Often
  • *
  • Posts: 1890
(No subject)
« Reply #9 on: May 16, 2006, 02:36:31 AM »
Fix has been checked in.  You're on top of things!  You found that bug less than an hour after I checked it in.  I didn't catch it because it was in a code path that reads "old" 1.6 maps.  All the maps in the head revision have been upgraded to the 1.7 structure that includes map loading optimization, item no spawn areas and... moving platforms? :)
« Last Edit: December 31, 1969, 07:00:00 PM by Two52 »

Offline dolorous

  • Newbie
  • *
  • Posts: 16
(No subject)
« Reply #10 on: May 16, 2006, 10:38:47 AM »
Quote
Two52 wrote:
Unfortunately, I don't have a linux machine to compile this on before checking code in.


The current 1.7 alpha code still doesn't quite build on my slackware-current linux box.  I have to apply the following changes to it (in patch format this time), after which it builds perfectly:

Code: [Select]
diff -ur smw/Makefile smw-fixed/Makefile
--- smw/Makefile 2006-01-28 00:52:25.000000000 -0500
+++ smw-fixed/Makefile 2006-05-16 10:30:14.000000000 -0400
@@ -1,9 +1,9 @@
 all : smw leveledit
 
 
-COMMON_OBJS:=build/MapList.o build/gfx.o build/map.o build/SFont.o build/path.o build/dirlist.o
+COMMON_OBJS:=build/MapList.o build/gfx.o build/input.o build/map.o build/movingplatform.o build/SFont.o build/path.o build/dirlist.o
 SMW_OBJS:= build/HashTable.o build/eyecandy.o
-           build/gamemodes.o build/main.o
+           build/gamemodes.o build/global.o build/main.o
            build/map.o build/menu.o build/net.o build/object.o
            build/player.o build/sfx.o build/splash.o
            build/uicontrol.o build/uimenu.o
diff -ur smw/_src/global.h smw-fixed/_src/global.h
--- smw/_src/global.h 2006-05-16 10:25:44.000000000 -0400
+++ smw-fixed/_src/global.h 2006-05-16 10:29:13.000000000 -0400
@@ -21,7 +21,7 @@
 
 #include "sfx.h"
 #include "gfx.h"
-//#include "net.h"
+#include "net.h"
 #include "path.h"
 #ifdef LINUXFUNC
 #include "linfunc.h"

The second part of the patch is to avoid getting a long list of errors when trying to compile net.cpp:

Code: [Select]
_src/net.cpp: In function `bool net_init()':
_src/net.cpp:122: error: `SDLNet_Init' was not declared in this scope
_src/net.cpp:124: error: `SDLNet_GetError' was not declared in this scope
_src/net.cpp:124: warning: unused variable 'SDLNet_GetError'
_src/net.cpp:122: warning: unused variable 'SDLNet_Init'
_src/net.cpp:128: error: `SDLNet_Quit' was not declared in this scope
_src/net.cpp:130: error: `IPaddress' was not declared in this scope
_src/net.cpp:130: error: expected `;' before "ip"
_src/net.cpp:131: error: `ip' was not declared in this scope
_src/net.cpp:131: error: `SDLNet_ResolveHost' was not declared in this scope
_src/net.cpp:128: warning: unused variable 'SDLNet_Quit'
_src/net.cpp:130: warning: unused variable 'IPaddress'
_src/net.cpp:131: warning: unused variable 'SDLNet_ResolveHost'
_src/net.cpp: In function `void net_close()':
_src/net.cpp:139: error: `SDLNet_Quit' was not declared in this scope
_src/net.cpp:139: warning: unused variable 'SDLNet_Quit'
_src/net.cpp: At global scope:
_src/net.cpp:147: error: `NetServer' has not been declared
_src/net.cpp:148: error: ISO C++ forbids declaration of `NetServer' with no type
_src/net.cpp: In function `int NetServer()':
_src/net.cpp:149: error: `numclients' was not declared in this scope
_src/net.cpp:151: error: `MAXCLIENTS' was not declared in this scope
_src/net.cpp:153: error: `clients' was not declared in this scope
_src/net.cpp:151: warning: unused variable 'MAXCLIENTS'
_src/net.cpp:157: error: `tcpsock' was not declared in this scope
_src/net.cpp:158: error: `socketset' was not declared in this scope
_src/net.cpp:149: warning: unused variable 'numclients'
_src/net.cpp:157: warning: unused variable 'tcpsock'
_src/net.cpp:158: warning: unused variable 'socketset'
_src/net.cpp: At global scope:
_src/net.cpp:161: error: expected constructor, destructor, or type conversion before '::' token
_src/net.cpp:166: error: `NetServer' is not a class or namespace
_src/net.cpp: In function `bool startserver()':
_src/net.cpp:168: error: `socketset' was not declared in this scope
_src/net.cpp:168: error: `MAXCLIENTS' was not declared in this scope
_src/net.cpp:168: error: `SDLNet_AllocSocketSet' was not declared in this scope
_src/net.cpp:172: error: `SDLNet_GetError' was not declared in this scope
_src/net.cpp:172: warning: unused variable 'SDLNet_GetError'
_src/net.cpp:176: error: `ip' was not declared in this scope
_src/net.cpp:176: error: `SDLNet_ResolveHost' was not declared in this scope
_src/net.cpp:180: error: `tcpsock' was not declared in this scope
_src/net.cpp:180: error: `SDLNet_TCP_Open' was not declared in this scope
_src/net.cpp:184: error: `cleanup' was not declared in this scope
_src/net.cpp:185: error: `SDLNet_GetError' was not declared in this scope
_src/net.cpp:184: warning: unused variable 'cleanup'
_src/net.cpp:185: warning: unused variable 'SDLNet_GetError'
_src/net.cpp:189: error: `SDLNet_TCP_AddSocket' was not declared in this scope
_src/net.cpp:168: warning: unused variable 'MAXCLIENTS'
_src/net.cpp:168: warning: unused variable 'SDLNet_AllocSocketSet'
_src/net.cpp:176: warning: unused variable 'SDLNet_ResolveHost'
_src/net.cpp:180: warning: unused variable 'SDLNet_TCP_Open'
_src/net.cpp:189: warning: unused variable 'SDLNet_TCP_AddSocket'
_src/net.cpp: At global scope:
_src/net.cpp:195: error: `NetServer' is not a class or namespace
_src/net.cpp: In function `void update()':
_src/net.cpp:197: error: `socketset' was not declared in this scope
_src/net.cpp:197: error: `SDLNet_CheckSockets' was not declared in this scope
_src/net.cpp:199: error: `tcpsock' was not declared in this scope
_src/net.cpp:199: error: `SDLNet_SocketReady' was not declared in this scope
_src/net.cpp:201: error: `handleserver' was not declared in this scope
_src/net.cpp:201: warning: unused variable 'handleserver'
_src/net.cpp:199: warning: unused variable 'tcpsock'
_src/net.cpp:199: warning: unused variable 'SDLNet_SocketReady'
_src/net.cpp:204: error: `MAXCLIENTS' was not declared in this scope
_src/net.cpp:206: error: `clients' was not declared in this scope
_src/net.cpp:206: error: `SDLNet_SocketReady' was not declared in this scope
_src/net.cpp:208: error: `handleclient' was not declared in this scope
_src/net.cpp:208: warning: unused variable 'handleclient'
_src/net.cpp:206: warning: unused variable 'clients'
_src/net.cpp:206: warning: unused variable 'SDLNet_SocketReady'
_src/net.cpp:204: warning: unused variable 'MAXCLIENTS'
_src/net.cpp:197: warning: unused variable 'socketset'
_src/net.cpp:197: warning: unused variable 'SDLNet_CheckSockets'
_src/net.cpp: At global scope:
_src/net.cpp:213: error: `NetServer' is not a class or namespace
_src/net.cpp: In function `void handleserver()':
_src/net.cpp:218: error: `TCPsocket' was not declared in this scope
_src/net.cpp:218: error: expected `;' before "newsock"
_src/net.cpp:220: error: `newsock' was not declared in this scope
_src/net.cpp:220: warning: unused variable 'newsock'
_src/net.cpp:224: error: `MAXCLIENTS' was not declared in this scope
_src/net.cpp:226: error: `clients' was not declared in this scope
_src/net.cpp:226: warning: unused variable 'clients'
_src/net.cpp:224: warning: unused variable 'MAXCLIENTS'
_src/net.cpp:232: error: `MAXCLIENTS' was not declared in this scope
_src/net.cpp:237: error: `clients' was not declared in this scope
_src/net.cpp:240: error: `NET_MSG_REJECT' was not declared in this scope
_src/net.cpp:241: error: `SDLNet_TCP_Send' was not declared in this scope
_src/net.cpp:242: error: `socketset' was not declared in this scope
_src/net.cpp:242: error: `SDLNet_TCP_DelSocket' was not declared in this scope
_src/net.cpp:243: error: `SDLNet_TCP_Close' was not declared in this scope
_src/net.cpp:244: error: `numclients' was not declared in this scope
_src/net.cpp:240: warning: unused variable 'NET_MSG_REJECT'
_src/net.cpp:241: warning: unused variable 'SDLNet_TCP_Send'
_src/net.cpp:242: warning: unused variable 'socketset'
_src/net.cpp:242: warning: unused variable 'SDLNet_TCP_DelSocket'
_src/net.cpp:243: warning: unused variable 'SDLNet_TCP_Close'
_src/net.cpp:244: warning: unused variable 'numclients'
_src/net.cpp:254: error: `MAXCLIENTS' was not declared in this scope
_src/net.cpp:257: error: `NET_MSG_REJECT' was not declared in this scope
_src/net.cpp:258: error: `newsock' was not declared in this scope
_src/net.cpp:258: error: `SDLNet_TCP_Send' was not declared in this scope
_src/net.cpp:259: error: `SDLNet_TCP_Close' was not declared in this scope
_src/net.cpp:257: warning: unused variable 'NET_MSG_REJECT'
_src/net.cpp:258: warning: unused variable 'SDLNet_TCP_Send'
_src/net.cpp:259: warning: unused variable 'SDLNet_TCP_Close'
_src/net.cpp:268: error: `clients' was not declared in this scope
_src/net.cpp:268: error: `newsock' was not declared in this scope
_src/net.cpp:269: error: `SDLNet_TCP_GetPeerAddress' was not declared in this scope
_src/net.cpp:270: error: `socketset' was not declared in this scope
_src/net.cpp:270: error: `SDLNet_TCP_AddSocket' was not declared in this scope
_src/net.cpp:271: error: `numclients' was not declared in this scope
_src/net.cpp:269: warning: unused variable 'SDLNet_TCP_GetPeerAddress'
_src/net.cpp:270: warning: unused variable 'socketset'
_src/net.cpp:270: warning: unused variable 'SDLNet_TCP_AddSocket'
_src/net.cpp:271: warning: unused variable 'numclients'
_src/net.cpp:254: warning: unused variable 'MAXCLIENTS'
_src/net.cpp:218: warning: unused variable 'TCPsocket'
_src/net.cpp: At global scope:
_src/net.cpp:279: error: `NetServer' is not a class or namespace
_src/net.cpp: In function `void handleclient(int)':
_src/net.cpp:285: error: `clients' was not declared in this scope
_src/net.cpp:285: error: `SDLNet_TCP_Recv' was not declared in this scope
_src/net.cpp:295: error: `NET_MSG_DEL' was not declared in this scope
_src/net.cpp:296: error: `NET_MSG_DEL_SLOT' was not declared in this scope
_src/net.cpp:298: error: `MAXCLIENTS' was not declared in this scope
_src/net.cpp:302: error: `SDLNet_TCP_Send' was not declared in this scope
_src/net.cpp:302: warning: unused variable 'SDLNet_TCP_Send'
_src/net.cpp:298: warning: unused variable 'MAXCLIENTS'
_src/net.cpp:295: warning: unused variable 'NET_MSG_DEL'
_src/net.cpp:296: warning: unused variable 'NET_MSG_DEL_SLOT'
_src/net.cpp:307: error: `socketset' was not declared in this scope
_src/net.cpp:307: error: `SDLNet_TCP_DelSocket' was not declared in this scope
_src/net.cpp:308: error: `SDLNet_TCP_Close' was not declared in this scope
_src/net.cpp:307: warning: unused variable 'socketset'
_src/net.cpp:307: warning: unused variable 'SDLNet_TCP_DelSocket'
_src/net.cpp:308: warning: unused variable 'SDLNet_TCP_Close'
_src/net.cpp:315: error: `NET_MSG_JOIN' was not declared in this scope
_src/net.cpp:318: error: `NET_MSG_JOIN_NAME' was not declared in this scope
_src/net.cpp:324: error: `MAXCLIENTS' was not declared in this scope
_src/net.cpp:328: error: `sendnewclientmessage' was not declared in this scope
_src/net.cpp:328: warning: unused variable 'sendnewclientmessage'
_src/net.cpp:324: warning: unused variable 'MAXCLIENTS'
_src/net.cpp:334: error: `MAXCLIENTS' was not declared in this scope
_src/net.cpp:338: error: `sendnewclientmessage' was not declared in this scope
_src/net.cpp:338: warning: unused variable 'sendnewclientmessage'
_src/net.cpp:334: warning: unused variable 'MAXCLIENTS'
_src/net.cpp:318: warning: unused variable 'NET_MSG_JOIN_NAME'
_src/net.cpp:315: warning: unused variable 'NET_MSG_JOIN'
_src/net.cpp:285: warning: unused variable 'SDLNet_TCP_Recv'
_src/net.cpp: At global scope:
_src/net.cpp:352: error: `NetServer' is not a class or namespace
_src/net.cpp: In function `void sendnewclientmessage(int, int)':
_src/net.cpp:356: error: `clients' was not declared in this scope
_src/net.cpp:357: error: `NET_MSG_ADD' was not declared in this scope
_src/net.cpp:358: error: `NET_MSG_ADD_SLOT' was not declared in this scope
_src/net.cpp:359: error: `NET_MSG_ADD_NLEN' was not declared in this scope
_src/net.cpp:360: error: `NET_MSG_ADD_NAME' was not declared in this scope
_src/net.cpp:361: error: `SDLNet_TCP_Send' was not declared in this scope
_src/net.cpp:357: warning: unused variable 'NET_MSG_ADD'
_src/net.cpp:358: warning: unused variable 'NET_MSG_ADD_SLOT'
_src/net.cpp:359: warning: unused variable 'NET_MSG_ADD_NLEN'
_src/net.cpp:361: warning: unused variable 'SDLNet_TCP_Send'
_src/net.cpp: At global scope:
_src/net.cpp:364: error: `NetServer' is not a class or namespace
_src/net.cpp: In function `void broadcastmessage(char*)':
_src/net.cpp:369: error: `NET_MSG_CHAT' was not declared in this scope
_src/net.cpp:370: error: `NET_MSG_CHAT_NLEN' was not declared in this scope
_src/net.cpp:371: error: `NET_MSG_CHAT_BODY' was not declared in this scope
_src/net.cpp:373: error: `MAXCLIENTS' was not declared in this scope
_src/net.cpp:375: error: `clients' was not declared in this scope
_src/net.cpp:377: error: `SDLNet_TCP_Send' was not declared in this scope
_src/net.cpp:381: error: `SDLNet_GetError' was not declared in this scope
_src/net.cpp:384: error: `socketset' was not declared in this scope
_src/net.cpp:384: error: `SDLNet_TCP_DelSocket' was not declared in this scope
_src/net.cpp:385: error: `SDLNet_TCP_Close' was not declared in this scope
_src/net.cpp:386: error: `numclients' was not declared in this scope
_src/net.cpp:381: warning: unused variable 'SDLNet_GetError'
_src/net.cpp:384: warning: unused variable 'socketset'
_src/net.cpp:384: warning: unused variable 'SDLNet_TCP_DelSocket'
_src/net.cpp:385: warning: unused variable 'SDLNet_TCP_Close'
_src/net.cpp:386: warning: unused variable 'numclients'
_src/net.cpp:377: warning: unused variable 'SDLNet_TCP_Send'
_src/net.cpp:373: warning: unused variable 'MAXCLIENTS'
_src/net.cpp:369: warning: unused variable 'NET_MSG_CHAT'
_src/net.cpp:370: warning: unused variable 'NET_MSG_CHAT_NLEN'
_src/net.cpp: At global scope:
_src/net.cpp:392: error: `NetServer' is not a class or namespace
_src/net.cpp: In function `void cleanup()':
_src/net.cpp:394: error: `tcpsock' was not declared in this scope
_src/net.cpp:396: error: `SDLNet_TCP_Close' was not declared in this scope
_src/net.cpp:396: warning: unused variable 'SDLNet_TCP_Close'
_src/net.cpp:400: error: `socketset' was not declared in this scope
_src/net.cpp:402: error: `SDLNet_FreeSocketSet' was not declared in this scope
_src/net.cpp:402: warning: unused variable 'SDLNet_FreeSocketSet'
_src/net.cpp: At global scope:
_src/net.cpp:410: error: `NetClient' has not been declared
_src/net.cpp:411: error: ISO C++ forbids declaration of `NetClient' with no type
_src/net.cpp:413: error: expected constructor, destructor, or type conversion before '::' token
_src/net.cpp:416: error: `NetClient' is not a class or namespace
_src/net.cpp: In function `bool connecttoserver()':
_src/net.cpp:421: error: `ip' was not declared in this scope
_src/net.cpp:421: error: `SDLNet_ResolveHost' was not declared in this scope
_src/net.cpp:424: error: `SDLNet_GetError' was not declared in this scope
_src/net.cpp:424: warning: unused variable 'SDLNet_GetError'
_src/net.cpp:421: warning: unused variable 'ip'
_src/net.cpp:421: warning: unused variable 'SDLNet_ResolveHost'
_src/net.cpp:428: error: `tcpsock' was not declared in this scope
_src/net.cpp:428: error: `ip' was not declared in this scope
_src/net.cpp:428: error: `SDLNet_TCP_Open' was not declared in this scope
_src/net.cpp:432: error: `SDLNet_GetError' was not declared in this scope
_src/net.cpp:432: warning: unused variable 'SDLNet_GetError'
_src/net.cpp:437: error: `socketset' was not declared in this scope
_src/net.cpp:437: error: `SDLNet_AllocSocketSet' was not declared in this scope
_src/net.cpp:440: error: `SDLNet_GetError' was not declared in this scope
_src/net.cpp:440: warning: unused variable 'SDLNet_GetError'
_src/net.cpp:444: error: `SDLNet_TCP_AddSocket' was not declared in this scope
_src/net.cpp:428: warning: unused variable 'ip'
_src/net.cpp:428: warning: unused variable 'SDLNet_TCP_Open'
_src/net.cpp:437: warning: unused variable 'SDLNet_AllocSocketSet'
_src/net.cpp:444: warning: unused variable 'SDLNet_TCP_AddSocket'
_src/net.cpp: At global scope:
_src/net.cpp:449: error: `NetClient' is not a class or namespace
_src/net.cpp: In function `void update()':
_src/net.cpp:450: error: redefinition of `void update()'
_src/net.cpp:196: error: `void update()' previously defined here
_src/net.cpp:451: error: `socketset' was not declared in this scope
_src/net.cpp:451: error: `SDLNet_CheckSockets' was not declared in this scope
_src/net.cpp:453: error: `tcpsock' was not declared in this scope
_src/net.cpp:453: error: `SDLNet_SocketReady' was not declared in this scope
_src/net.cpp:453: warning: unused variable 'tcpsock'
_src/net.cpp:453: warning: unused variable 'SDLNet_SocketReady'
_src/net.cpp:451: warning: unused variable 'socketset'
_src/net.cpp:451: warning: unused variable 'SDLNet_CheckSockets'
_src/net.cpp: At global scope:
_src/net.cpp:460: error: `NetClient' is not a class or namespace
_src/net.cpp: In function `void handleserver()':
_src/net.cpp:461: error: redefinition of `void handleserver()'
_src/net.cpp:214: error: `void handleserver()' previously defined here
_src/net.cpp:467: error: `tcpsock' was not declared in this scope
_src/net.cpp:467: error: `SDLNet_TCP_Recv' was not declared in this scope
_src/net.cpp:471: error: `socketset' was not declared in this scope
_src/net.cpp:471: error: `SDLNet_TCP_DelSocket' was not declared in this scope
_src/net.cpp:472: error: `SDLNet_TCP_Close' was not declared in this scope
_src/net.cpp:471: warning: unused variable 'socketset'
_src/net.cpp:471: warning: unused variable 'SDLNet_TCP_DelSocket'
_src/net.cpp:472: warning: unused variable 'SDLNet_TCP_Close'
_src/net.cpp:481: error: `handleserverdata' was not declared in this scope
_src/net.cpp:481: warning: unused variable 'handleserverdata'
_src/net.cpp:467: warning: unused variable 'SDLNet_TCP_Recv'
_src/net.cpp: At global scope:
_src/net.cpp:496: error: `NetClient' is not a class or namespace
_src/net.cpp: In function `int handleserverdata(Uint8*)':
_src/net.cpp:502: error: `NET_MSG_ADD' was not declared in this scope
_src/net.cpp:505: error: `NET_MSG_ADD_SLOT' was not declared in this scope
_src/net.cpp:507: error: `MAXCLIENTS' was not declared in this scope
_src/net.cpp:507: error: `peers' was not declared in this scope
_src/net.cpp:507: warning: unused variable 'MAXCLIENTS'
_src/net.cpp:507: warning: unused variable 'peers'
_src/net.cpp:514: error: `peers' was not declared in this scope
_src/net.cpp:514: error: `NET_MSG_ADD_NAME' was not declared in this scope
_src/net.cpp:521: error: `NET_MSG_ADD_NLEN' was not declared in this scope
_src/net.cpp:505: warning: unused variable 'NET_MSG_ADD_SLOT'
_src/net.cpp:521: warning: unused variable 'NET_MSG_ADD_NLEN'
_src/net.cpp:525: error: `NET_MSG_DEL' was not declared in this scope
_src/net.cpp:530: error: `NET_MSG_DEL_SLOT' was not declared in this scope
_src/net.cpp:531: error: `MAXCLIENTS' was not declared in this scope
_src/net.cpp:531: error: `peers' was not declared in this scope
_src/net.cpp:531: warning: unused variable 'MAXCLIENTS'
_src/net.cpp:531: warning: unused variable 'peers'
_src/net.cpp:536: error: `peers' was not declared in this scope
_src/net.cpp:541: error: `NET_MSG_DEL_LEN' was not declared in this scope
_src/net.cpp:530: warning: unused variable 'NET_MSG_DEL_SLOT'
_src/net.cpp:541: warning: unused variable 'NET_MSG_DEL_LEN'
_src/net.cpp:545: error: `NET_MSG_REJECT' was not declared in this scope
_src/net.cpp:548: error: `NET_MSG_REJECT_LEN' was not declared in this scope
_src/net.cpp:548: warning: unused variable 'NET_MSG_REJECT_LEN'
_src/net.cpp:552: error: `NET_MSG_CHAT' was not declared in this scope
_src/net.cpp:556: error: `NET_MSG_CHAT_BODY' was not declared in this scope
_src/net.cpp:562: error: `NET_MSG_CHAT_NLEN' was not declared in this scope
_src/net.cpp:562: warning: unused variable 'NET_MSG_CHAT_NLEN'
_src/net.cpp:502: warning: unused variable 'NET_MSG_ADD'
_src/net.cpp:525: warning: unused variable 'NET_MSG_DEL'
_src/net.cpp:545: warning: unused variable 'NET_MSG_REJECT'
_src/net.cpp:552: warning: unused variable 'NET_MSG_CHAT'
_src/net.cpp: At global scope:
_src/net.cpp:577: error: `NetClient' is not a class or namespace
_src/net.cpp: In function `void cleanup()':
_src/net.cpp:578: error: redefinition of `void cleanup()'
_src/net.cpp:393: error: `void cleanup()' previously defined here
_src/net.cpp:580: error: `tcpsock' was not declared in this scope
_src/net.cpp:582: error: `SDLNet_TCP_Close' was not declared in this scope
_src/net.cpp:582: warning: unused variable 'SDLNet_TCP_Close'
_src/net.cpp:586: error: `socketset' was not declared in this scope
_src/net.cpp:588: error: `SDLNet_FreeSocketSet' was not declared in this scope
_src/net.cpp:588: warning: unused variable 'SDLNet_FreeSocketSet'
_src/net.cpp: At global scope:
_src/net.cpp:593: error: `NetClient' is not a class or namespace
_src/net.cpp: In function `void sendjoin()':
_src/net.cpp:598: error: `tcpsock' was not declared in this scope
_src/net.cpp:601: error: `NET_MSG_JOIN' was not declared in this scope
_src/net.cpp:605: error: `NET_MSG_JOIN_NLEN' was not declared in this scope
_src/net.cpp:606: error: `NET_MSG_JOIN_NAME' was not declared in this scope
_src/net.cpp:610: error: `SDLNet_TCP_Send' was not declared in this scope
_src/net.cpp:601: warning: unused variable 'NET_MSG_JOIN'
_src/net.cpp:605: warning: unused variable 'NET_MSG_JOIN_NLEN'
_src/net.cpp:610: warning: unused variable 'SDLNet_TCP_Send'
make: *** [build/net.o] Error 1

Why is the include commented out, by the way?

The first part of the patch is to avoid getting another long list of linking errors after net.cpp and the other source files are compiled:

Code: [Select]
build/map.o(.text+0x244): In function `CMap::clearPlatforms()':
_src/map.cpp:263: undefined reference to `MovingPlatform::~MovingPlatform()'
build/map.o(.text+0x108d): In function `CMap::update()':
_src/map.cpp:1512: undefined reference to `MovingPlatform::update()'
build/map.o(.text+0x10af):_src/map.cpp:1512: undefined reference to `MovingPlatform::update()'
build/map.o(.text+0x10fd): In function `CMap::drawPlatforms()':
_src/map.cpp:1520: undefined reference to `MovingPlatform::draw()'
build/map.o(.text+0x111f):_src/map.cpp:1520: undefined reference to `MovingPlatform::draw()'
build/map.o(.text+0x1181): In function `CMap::movingPlatformCollision(CPlayer*)':
_src/map.cpp:1528: undefined reference to `MovingPlatform::collide(CPlayer*)'
build/map.o(.text+0x11e4): In function `CMap::movingPlatformCollision(IO_MovingObject*)':
_src/map.cpp:1539: undefined reference to `MovingPlatform::collide(IO_MovingObject*)'
build/map.o(.text+0x122d): In function `CMap::resetPlatforms()':
_src/map.cpp:1547: undefined reference to `MovingPlatform::ResetPath()'
build/map.o(.text+0x124f):_src/map.cpp:1547: undefined reference to `MovingPlatform::ResetPath()'
build/map.o(.text+0x1591): In function `CMap::findspawnpoint(short, short*, short*, short, short, bool)':
_src/map.cpp:1622: undefined reference to `MovingPlatform::CalculateNoSpawnZone()'
build/map.o(.text+0x15f8):_src/map.cpp:1678: undefined reference to `MovingPlatform::IsInNoSpawnZone(short, short, short, short)'
build/map.o(.text+0x402c): In function `CMap::loadMap(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
_src/map.cpp:453: undefined reference to `MovingPlatformPath::MovingPlatformPath(float, float, float, float, float)'
build/map.o(.text+0x4076):_src/map.cpp:455: undefined reference to `MovingPlatform::MovingPlatform(short**, short, short, MovingPlatformPath*, bool, short)'
build/main.o(.text+0xe06): In function `RunGame()':
_src/main.cpp:924: undefined reference to `CPlayerInput::ResetKeys()'
build/main.o(.text+0x111d):_src/main.cpp:1213: undefined reference to `CPlayerInput::ClearPressedKeys(short)'
build/main.o(.text+0x1167):_src/main.cpp:1345: undefined reference to `CPlayerInput::Update(SDL_Event, short)'
build/main.o(.text+0x168f):_src/main.cpp:1399: undefined reference to `CPlayerInput::ResetKeys()'
build/main.o(.text+0x2bd4):_src/main.cpp:1436: undefined reference to `CPlayerInput::ResetKeys()'
build/main.o(.text+0x3afa): In function `main':
_src/main.cpp:632: undefined reference to `g_iDefaultPowerupWeights'
build/main.o(.text+0x3c0a):_src/main.cpp:657: undefined reference to `controlkeys'
build/main.o(.text+0x3fc2):_src/main.cpp:795: undefined reference to `CPlayerInput::CheckIfMouseUsed()'
build/main.o(.text+0x6e3f): In function `global constructors keyed to screen':
_src/main.cpp:2284: undefined reference to `CPlayerInput::CPlayerInput()'
build/menu.o(.text+0xf417): In function `Menu::RunMenu()':
_src/menu.cpp:760: undefined reference to `CPlayerInput::ResetKeys()'
build/menu.o(.text+0xf460):_src/menu.cpp:937: undefined reference to `CPlayerInput::ClearPressedKeys(short)'
build/menu.o(.text+0xf4a3):_src/menu.cpp:990: undefined reference to `CPlayerInput::Update(SDL_Event, short)'
build/menu.o(.text+0xfeb1):_src/menu.cpp:1210: undefined reference to `g_iDefaultPowerupWeights'
build/menu.o(.text+0xfecc):_src/menu.cpp:1211: undefined reference to `g_iDefaultPowerupWeights'
build/splash.o(.text+0x1073): In function `LoadAndSplashScreen()':
_src/splash.cpp:227: undefined reference to `CPlayerInput::ClearPressedKeys(short)'
build/splash.o(.text+0x10e5):_src/splash.cpp:289: undefined reference to `CPlayerInput::Update(SDL_Event, short)'
build/splash.o(.text+0x126e):_src/splash.cpp:325: undefined reference to `CPlayerInput::ResetKeys()'
build/uicontrol.o(.text+0xac5): In function `MI_InputControlField::SendInput(CPlayerInput*)':
_src/uicontrol.cpp:686: undefined reference to `CPlayerInput::Update(SDL_Event, short)'
build/uicontrol.o(.text+0xb08):_src/uicontrol.cpp:834: undefined reference to `CPlayerInput::CheckIfMouseUsed()'
build/uicontrol.o(.text+0xb14):_src/uicontrol.cpp:837: undefined reference to `CPlayerInput::ResetKeys()'
build/uicontrol.o(.text+0xeb0): In function `MI_InputControlField::Draw()':
_src/uicontrol.cpp:861: undefined reference to `Joynames'
build/uicontrol.o(.text+0xf03):_src/uicontrol.cpp:859: undefined reference to `Keynames'
build/uicontrol.o(.text+0x1344): In function `MI_InputControlContainer::SendInput(CPlayerInput*)':
_src/uicontrol.cpp:1030: undefined reference to `CPlayerInput::ResetKeys()'
build/uicontrol.o(.text+0x96aa): In function `MI_InputControlContainer::MI_InputControlContainer(gfxSprite*, short, short, short)':
_src/uicontrol.cpp:914: undefined reference to `GameInputNames'
build/uicontrol.o(.text+0x974e):_src/uicontrol.cpp:921: undefined reference to `MenuInputNames'
build/uicontrol.o(.text+0xa2ad): In function `MI_InputControlContainer::MI_InputControlContainer(gfxSprite*, short, short, short)':
_src/uicontrol.cpp:914: undefined reference to `GameInputNames'
build/uicontrol.o(.text+0xa34e):_src/uicontrol.cpp:921: undefined reference to `MenuInputNames'
collect2: ld returned 1 exit status
make: *** [smw] Error 1


These errors occur because the makefile doesn't account for the newly added source files input.c, movingplatform.c, and global.c.

I hope this is helpful.
« Last Edit: December 31, 1969, 07:00:00 PM by dolorous »

Offline Two52

  • Administrator
  • Posts Very Often
  • *
  • Posts: 1890
(No subject)
« Reply #11 on: May 16, 2006, 01:28:07 PM »
This looks like an old makefile.  net.cpp shouldn't be compiled anymore.   It contains some network support functions and we're not including that in the next release.  And global, input and movingplatform are all new source files.  If you want to send me the updated makefile, I can check it into the project.
« Last Edit: December 31, 1969, 07:00:00 PM by Two52 »

Offline dolorous

  • Newbie
  • *
  • Posts: 16
(No subject)
« Reply #12 on: May 16, 2006, 05:21:43 PM »
Two52 wrote:
Quote
This looks like an old makefile. net.cpp shouldn't be compiled anymore. It contains some network support functions and we're not including that in the next release. And global, input and movingplatform are all new source files. If you want to send me the updated makefile, I can check it into the project.


Thanks for the info.  I removed references to net.cpp from the makefile after adding the same objects as before, and it builds perfectly that way too.  I'll send the updated makefile momentarily.
« Last Edit: December 31, 1969, 07:00:00 PM by dolorous »

Offline Techokami

  • Gettin' Into the Swing of Things
  • **
  • Posts: 27
    • http://metroidr.brpxqzme.net/
(No subject)
« Reply #13 on: May 24, 2006, 06:38:37 PM »
Eh, curiousity got the best of me, so I tried compiling the code from HEAD on my Fedora Core 5 box.  Things go smoothly, then...
Code: [Select]
g++  -DLINUXFUNC -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -Wall -I. -Dstricmp=strcasecmp -DSleep=SDL_Delay -o build/main.o -c _src/main.cpp
_src/main.cpp: In function ‘void CleanDeadPlayers()’:
_src/main.cpp:412: error: ‘CountAliveTeams’ was not declared in this scope
make: *** [build/main.o] Error 1
« Last Edit: December 31, 1969, 07:00:00 PM by Techokami »

Offline Two52

  • Administrator
  • Posts Very Often
  • *
  • Posts: 1890
(No subject)
« Reply #14 on: May 24, 2006, 06:52:35 PM »
Hmm.  I checked in a possible fix.  Please get the latest and compile again.
« Last Edit: December 31, 1969, 07:00:00 PM by Two52 »