Closed ghost closed 4 years ago
I had an issue compiling on FreeBSD 12.1 due to a missing header include. Adding:
#if defined(__FreeBSD__) #include <netinet/in.h> #endif
to the includes for non-windows systems in oatpp/src/oatpp/network/server/SimpleTCPConnectionProvider.cpp resolves the issue.
Another issue came during linking since it links with -latomic which does not work on FreeBSD as -latomic is not needed. Adding:
if(MSVC) target_link_libraries(oatpp PUBLIC ${CMAKE_THREAD_LIBS_INIT} wsock32 ws2_32) elseif(APPLE) target_link_libraries(oatpp PUBLIC ${CMAKE_THREAD_LIBS_INIT}) else(MSVC) if(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") target_link_libraries(oatpp PUBLIC ${CMAKE_THREAD_LIBS_INIT}) else(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") target_link_libraries(oatpp PUBLIC ${CMAKE_THREAD_LIBS_INIT} atomic) endif(${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") endif(MSVC)
to the CMakeLists.txt in the src directory resolved this for me.
Wrong repo
I had an issue compiling on FreeBSD 12.1 due to a missing header include. Adding:
to the includes for non-windows systems in oatpp/src/oatpp/network/server/SimpleTCPConnectionProvider.cpp resolves the issue.
Another issue came during linking since it links with -latomic which does not work on FreeBSD as -latomic is not needed. Adding:
to the CMakeLists.txt in the src directory resolved this for me.