-
Notifications
You must be signed in to change notification settings - Fork 33
Description
I am trying to build bonefish on a windows 7 system and I am running into some problems.
I am using either MSVC 2015 of GCC version 5.3.0 (buildt by the MinGW-W64 project) and Boost version 1.60.
For my GCC attempt I created a folder "C:\temp\bonefish\bonefish-build" and executed:
cmake -G "CodeBlocks - MinGW Makefiles" ../
mingW32-make -f Makefile
from the command-line within that directory.
This failed after it created among others: C:\temp\bonefish\bonefish-build\CMakeCache.txt
In that file I have modified all references to the pre-build Boost libraries (program_options, system, thread, chrono, date_time and atomic).
Because I am on a Windows system I also had to change RT_LIBRARY:FILEPATH. In my case i had to change it to (depending on the location of the compiler):
RT_LIBRARY:FILEPATH=C:/mingw32/i686-w64-mingw32/lib/libws2_32.a
I ran both commands again and got a Code::Blocks project, but it would not build yet.
In bonefish/rawsocket/rawsocket_connection.hpp there is an include of <arpa/inet.h>, that does not exist on Windows. I had to change that include to <winsock2.h>. Maybe an #ifdef can be used here?
Because I know that including winsock2 often causes problems if WIN32_LEAN_AND_MEAN has not been defined I also defined this for the project. I did this by editing bonefish\CMakeLists.txt:
if(WIN32)
add_definitions(-D_WIN32_WINNT=0x0500)
endif()
became
if(WIN32)
add_definitions(-D_WIN32_WINNT=0x0500)
add_definitions(-DWIN32_LEAN_AND_MEAN)
endif()
Subsequently I ran into problems with the third-party includes from: bonefish\third-party\msgpack-c
These problems could be overcome by reverting the msgpack-c files to the revision mentioned in the readme.md and changing: bonefish/CMakeList.txt
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "-Wall -Werror -Wno-unused-variable -std=c++11 ${CMAKE_CXX_FLAGS}")
else()
into:
if(NOT MSVC)
set(CMAKE_CXX_FLAGS "-Wall -Werror -Wno-unused-variable -fno-strict-aliasing -std=c++11 ${CMAKE_CXX_FLAGS}")
else()
I ran both commands again and got a Code::Blocks project, but it would not build yet.
Now if I try to build the project I get errors from bonefish/src/bonefish/rawsocket/uds_listener stating that:
In file included from C:\temp\bonefish\src\bonefish\rawsocket\uds_listener.cpp:17:0:
C:/temp/bonefish/src/bonefish/rawsocket/uds_listener.hpp:47
C:/temp/bonefish/rawsocket/uds_listener.hpp:48
C:/temp/bonefish/rawsocket/uds_listener.hpp:49
In file included from C:\temp\bonefish\src\bonefish\rawsocket\uds_listener.cpp:18
C:/temp/bonefish/rawsocket/uds_connection.hpp:32
error: 'local' in namespace 'boost::asio' does not name a type
And some other errors that seem to be the result of these.
Now I don't have any ideas bot how to overcome this one and I hope someone will be able to help me bit. Also, if there is a pre-compiled stand-alone router or a DLL that I could use on a windows 7 system I would appreciate to get those so that I can also spend some time on trying out the actual communication.
Kind regards, Nico