aMule Forum

English => Compilation problems => Topic started by: mr_hyde on October 05, 2015, 10:39:42 PM

Title: WebServer: little problem while compiling latest amule from github for MacOS
Post by: mr_hyde on October 05, 2015, 10:39:42 PM
I had a compile error about wxSocketEvent while building latest amule from github.

To fix it I simply added the statement

Code: [Select]
#include <wx/socket.h>  // needed for wxSocketEvent.h

in src/weberver/src/WebServer.h

Please notice that the problem was related to the lines (in src/weberver/src/WebServer.h)

Code: [Select]
void OnWebSocketServerEvent(wxSocketEvent& event);
void OnWebSocketEvent(wxSocketEvent& event);

so probably an alternative way to fix the problem could be:

1) forward declaration of wxSocketEvent in WebServer.h
Code: [Select]

class wxSocketEvent; // forward declaration

class CWebServerBase : public wxEvtHandler {
protected:
[...]

2) add the include of <wx/socket.h> in WebServer.cpp

Bye,
  Mr Hyde


Title: Re: WebServer: little problem while compiling latest amule from github for MacOS
Post by: GonoszTopi on October 08, 2015, 01:58:29 AM
... and the proper way is to exclude wxSocket-related code from Boost.Asio builds. ;-)

Should be fixed by 4af1ed5 (https://github.com/amule-project/amule/commit/4af1ed5b15f2549847f8aff68c9f66dde7dcb860).