TheAssemblyArmada / Vanilla-Conquer

Vanilla Conquer provides clean, cross-platform builds of the C&C Remastered Collection and the standalone legacy games.
Other
343 stars 52 forks source link

Vanilla does not compile on WIN32 when SDL2 is disabled #764

Open giulianobelinassi opened 2 years ago

giulianobelinassi commented 2 years ago

wsproto.cpp compilation fails with the following messages (mingw32-gcc 10.3.0)

/home/giulianob/projects/Vanilla-Conquer/common/wspudp.cpp: In member function 'virtual void UDPInterfaceClass::Broadcast(void*, int)':
/home/giulianob/projects/Vanilla-Conquer/common/wspudp.cpp:343:21: error: 'MainWindow' was not declared in this scope; did you mean 'MoveWindow'?
  343 |         SendMessage(MainWindow, Protocol_Event_Message(), 0, (LONG)FD_WRITE);
      |                     ^~~~~~~~~~
      |                     MoveWindow
/home/giulianob/projects/Vanilla-Conquer/common/wsproto.cpp: In member function 'virtual bool WinsockInterfaceClass::Start_Listening()':
/home/giulianob/projects/Vanilla-Conquer/common/wsproto.cpp:203:32: error: 'MainWindow' was not declared in this scope; did you mean 'MoveWindow'?
  203 |     if (WSAAsyncSelect(Socket, MainWindow, Protocol_Event_Message(), FD_READ | FD_WRITE) == SOCKET_ERROR) {
      |                                ^~~~~~~~~~
      |                                MoveWindow
make[2]: *** [common/CMakeFiles/commonv.dir/build.make:272: common/CMakeFiles/commonv.dir/wspudp.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
/home/giulianob/projects/Vanilla-Conquer/common/wsproto.cpp:204:9: error: 'WWDebugString' was not declared in this scope
  204 |         WWDebugString("TS: Async select failed.\n");
      |         ^~~~~~~~~~~~~
/home/giulianob/projects/Vanilla-Conquer/common/wsproto.cpp: In member function 'virtual void WinsockInterfaceClass::WriteTo(void*, int, void*)':
/home/giulianob/projects/Vanilla-Conquer/common/wsproto.cpp:463:17: error: 'MainWindow' was not declared in this scope; did you mean 'MoveWindow'?
  463 |     SendMessage(MainWindow, Protocol_Event_Message(), 0, (LONG)FD_WRITE);
      |                 ^~~~~~~~~~
      |                 MoveWindow
/home/giulianob/projects/Vanilla-Conquer/common/wsproto.cpp: In member function 'virtual void WinsockInterfaceClass::Broadcast(void*, int)':
/home/giulianob/projects/Vanilla-Conquer/common/wsproto.cpp:515:17: error: 'MainWindow' was not declared in this scope; did you mean 'MoveWindow'?
  515 |     SendMessage(MainWindow, Protocol_Event_Message(), 0, (LONG)FD_WRITE);
      |                 ^~~~~~~~~~
      |                 MoveWindow
make[2]: *** [common/CMakeFiles/commonv.dir/build.make:258: common/CMakeFiles/commonv.dir/wsproto.cpp.o] Error 1
giulianobelinassi commented 2 years ago

wspudp.cpp fails as well.

OmniBlade commented 2 years ago

Two solutions to this really, either we remove support for the none SDL build which is basically windows directdraw/directsound or someone takes on maintaining it, perhaps as a port to earlier versions of windows which the current builds no longer support?

OmniBlade commented 2 years ago

Fixed in #774?