icculus / Serious-Engine

An open source version of a game engine developed by Croteam for the classic Serious Sam games.
GNU General Public License v2.0
164 stars 21 forks source link

Dedicated server #22

Closed stevenc99 closed 8 years ago

stevenc99 commented 8 years ago

I needed these fixes to compile and link DedicatedServer.

I added the dummy _hwndMain because Engine/Base/ErrorReporting.cpp refers to an extern HWND _hwndMain which gives me a fatal linker error because no object declared it.

CMakeFiles/SeriousSamDedicated.dir/Engine/Base/ErrorReporting.cpp.o: In function FatalError(char const*, ...)': Sources/Engine/Base/ErrorReporting.cpp:62: undefined reference to_hwndMain' Sources/Engine/Base/ErrorReporting.cpp:63: undefined reference to _hwndMain' CMakeFiles/SeriousSamDedicated.dir/Engine/Base/ErrorReporting.cpp.o: In functionWarningMessage(char const_, ...)': Sources/Engine/Base/ErrorReporting.cpp:118: undefined reference to _hwndMain' CMakeFiles/SeriousSamDedicated.dir/Engine/Base/ErrorReporting.cpp.o: In functionInfoMessage(char const_, ...)': Sources/Engine/Base/ErrorReporting.cpp:139: undefined reference to _hwndMain' CMakeFiles/SeriousSamDedicated.dir/Engine/Base/ErrorReporting.cpp.o: In functionYesNoMessage(char const*, ...)': Sources/Engine/Base/ErrorReporting.cpp:173: undefined reference to `_hwndMain' collect2: error: ld returned 1 exit status

Declaring it and assigning NULL, causes the SDL functions to fail quietly. Perhaps DedicatedServer should stop linking this file someday (because it requires linking with SDL).