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).
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 function
WarningMessage(char const_, ...)': Sources/Engine/Base/ErrorReporting.cpp:118: undefined reference to_hwndMain' CMakeFiles/SeriousSamDedicated.dir/Engine/Base/ErrorReporting.cpp.o: In function
InfoMessage(char const_, ...)': Sources/Engine/Base/ErrorReporting.cpp:139: undefined reference to_hwndMain' CMakeFiles/SeriousSamDedicated.dir/Engine/Base/ErrorReporting.cpp.o: In function
YesNoMessage(char const*, ...)': Sources/Engine/Base/ErrorReporting.cpp:173: undefined reference to `_hwndMain' collect2: error: ld returned 1 exit statusDeclaring 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).