1.7.3 C++ on UE4 Boost Libs wont compile

Post here your questions about the C++ API for SFS2X

Moderators: Lapo, Bax, MBagnati

Heaven
Posts: 10
Joined: 28 Jun 2017, 21:07

1.7.3 C++ on UE4 Boost Libs wont compile

Postby Heaven » 28 Jun 2017, 21:16

So I'm following the proof of concept for SFS2X using the 1.7.3 C++ API and UE4 4.16.1 but I can't seem to get the boost libs to compile under the Engine

I might be doing something wrong when compiling the libs, I've compiled them successful using this options and VS2015 (initially tried with VS2017 same results in both):

Code: Select all

b2 -a toolset=msvc-14.0 address-model=64 threading=multi link=static runtime-link=shared --with-system stage
b2 -a toolset=msvc-14.0 address-model=64 threading=multi link=static runtime-link=shared --with-date_time stage
b2 -a toolset=msvc-14.0 address-model=64 threading=multi link=static runtime-link=shared --with-chrono stage
b2 -a toolset=msvc-14.0 address-model=64 threading=multi link=static runtime-link=shared --with-regex stage
b2 -a toolset=msvc-14.0 address-model=64 threading=multi link=static runtime-link=shared --with-thread stage


Any help is welcome :)

Code: Select all

Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/config/stdlib/dinkumware.hpp(99) : warning C4668: '_HAS_NAMESPACE' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/throw_exception.hpp(3) : warning C4668: '__GNUC__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/throw_exception.hpp(3) : warning C4668: '__GNUC_MINOR__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/predef/other/endian.h(151) : warning C4668: 'BOOST_ARCH_AMD64' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/smart_ptr/shared_ptr.hpp(777) : warning C4668: '__GNUC__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/exception/all.hpp(8) : warning C4668: '__GNUC__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/exception/all.hpp(8) : warning C4668: '__GNUC_MINOR__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/config.hpp(227) : warning C4005: 'BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT': macro redefinition
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/config.hpp(213) : note: see previous definition of 'BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT'
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(36) : error C2039: 'InterlockedIncrement': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(36) : error C3861: 'InterlockedIncrement': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(40) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(40) : error C3861: 'InterlockedExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(46) : error C2039: 'InterlockedIncrement': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(46) : error C3861: 'InterlockedIncrement': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(48) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(48) : error C3861: 'InterlockedExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(54) : error C2039: 'InterlockedDecrement': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(54) : error C3861: 'InterlockedDecrement': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(62) : error C2039: 'InterlockedDecrement': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(62) : error C3861: 'InterlockedDecrement': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(67) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(67) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(84) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(84) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(90) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(90) : error C3861: 'InterlockedExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(96) : error C2039: 'InterlockedIncrement': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(96) : error C3861: 'InterlockedIncrement': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(102) : error C2039: 'InterlockedDecrement': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(102) : error C3861: 'InterlockedDecrement': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(51) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(51) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(56) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(56) : error C3861: 'InterlockedExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(93) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(93) : error C3861: 'InterlockedExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(102) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(102) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(112) : error C2039: 'InterlockedDecrement': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(112) : error C3861: 'InterlockedDecrement': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(125) : error C2039: 'InterlockedDecrement': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(125) : error C3861: 'InterlockedDecrement': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(153) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(153) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(172) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(172) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(187) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(187) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(206) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(206) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(221) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(221) : error C3861: 'InterlockedExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(223) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(223) : error C3861: 'InterlockedExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(247) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(247) : error C3861: 'InterlockedExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(268) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(268) : error C3861: 'InterlockedExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(279) : error C2039: 'InterlockedDecrement': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(279) : error C3861: 'InterlockedDecrement': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(286) : error C2039: 'InterlockedCompareExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(286) : error C3861: 'InterlockedCompareExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(295) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(295) : error C3861: 'InterlockedExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(319) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(319) : error C3861: 'InterlockedExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(341) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(341) : error C3861: 'InterlockedExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(350) : error C2039: 'InterlockedCompareExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(350) : error C3861: 'InterlockedCompareExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(399) : error C2039: 'InterlockedCompareExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(399) : error C3861: 'InterlockedCompareExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(434) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(434) : error C3861: 'InterlockedExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(438) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(438) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(441) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(441) : error C3861: 'InterlockedExchange': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_socket_service_base.ipp(211) : warning C4191: 'type cast': unsafe conversion from 'FARPROC' to 'cancel_io_ex_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_socket_service_base.ipp(713) : error C3861: 'InterlockedCompareExchangePointer': identifier not found
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_handle_service.ipp(244) : warning C4191: 'type cast': unsafe conversion from 'FARPROC' to 'cancel_io_ex_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/thread/win32/thread_primitives.hpp(312) : warning C4191: 'type cast': unsafe conversion from 'boost::detail::win32::farproc_t' to 'boost::detail::win32::detail::gettickcount64_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/ratio/config.hpp(16) : warning C4668: '__GNUC__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/smart_ptr/intrusive_ptr.hpp(223) : warning C4668: '__GNUC__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(1627) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtQuerySystemInformation_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(1834) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtSetInformationFile_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(1836) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtQueryObject_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(1908) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtOpenFile_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(1909) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtClose_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(2288) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtQuerySection_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(2301) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtQuerySemaphore_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(2312) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtQueryTimerResolution_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(2319) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtSetTimerResolution_t'
Info
Info         Calling this function through the result pointer may cause your program to fail
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(2326) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::QueryPerformanceCounter_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\Flying Cookie\Biscuit\ThirdParty\SmartFoxServer2X\Include\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(2333) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::QueryPerformanceFrequency_t'
Info         Calling this function through the result pointer may cause your program to fail
Info
Info Error executing C:\Program Files (x86)\Microsoft Visual Studio\Shared\14.0\VC\bin\amd64\cl.exe (tool returned code: 2)
Info ---------------------- Done ----------------------
User avatar
Lapo
Site Admin
Posts: 19759
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: 1.7.3 C++ on UE4 Boost Libs wont compile

Postby Lapo » 29 Jun 2017, 07:26

Hi,
Heaven wrote:So I'm following the proof of concept for SFS2X using the 1.7.3 C++ API and UE4 4.16.1 but I can't seem to get the boost libs to compile under the Engine

The API don't need UE4 to compile, it's a separate process, so I am not sure what you mean by "under the Engine"

I might be doing something wrong when compiling the libs, I've compiled them successful using this options and VS2015 (initially tried with VS2017 same results in both):

Ok, so I am a little confused :)
If you have successfully compiled the API, what is the problem exactly?

Are you having problems compiling an UE4 project that also uses the API?

Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
Heaven
Posts: 10
Joined: 28 Jun 2017, 21:07

Re: 1.7.3 C++ on UE4 Boost Libs wont compile

Postby Heaven » 29 Jun 2017, 23:02

Hallo,

My bad I didn't express myself properly, I mean when I try to use #include in the UE4 project it doesn't allow the engine to compile the game project... I'm following the proff of concept pdf and basing it of the example code.

Bellow are the two only classes that were changed from the vanilla project, the first one does not prevent the UE4 from compiling.

If I compile changing only the UE4 build class the project doesn't break and the UE4 is able to compile the code

Code: Select all

// Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.

using UnrealBuildTool;

public class Biscuit : ModuleRules
{

    // Define path for Boost library
    private string ThirdPartyPathBoostLib
    {
        get { return @"F:/FlyingCookie/Biscuit/ThirdParty/SmartFoxClientAPI/Core/BoostAsio/Windows/stage/lib"; }
        //$$££$$ get { return @"..\..\SmartFoxClientAPI\Lib"; }
    }

    // Define path for Boost includes
    private string ThirdPartyPathBoostInclude
    {
        get { return @"F:/FlyingCookie/Biscuit/ThirdParty/SmartFoxClientAPI/Core/BoostAsio/Windows"; }
        //$$££$$ get { return @".\SmartFoxClientAPI\Include\Core\BoostAsio\Windows"; }
    }

    // Define path for SmartFoxClientAPI library
    private string ThirdPartyPathSmartFoxClientAPILib
    {
        get { return @"F:/FlyingCookie/Biscuit/ThirdParty/SmartFoxClientAPI/Deploy/VisualStudio2015/Release/x64"; }
        //$$££$$ get { return @"..\..\SmartFoxClientAPI\Lib"; }
    }

    // Define path for SmartFoxClientAPI includes
    private string ThirdPartyPathSmartFoxClientAPIInclude
    {
        get { return @"F:/FlyingCookie/Biscuit/ThirdParty/SmartFoxClientAPI"; }
        //$$££$$ get { return @".\SmartFoxClientAPI\Include"; }
    }

    /// <summary>
    /// Load Boost library
    /// </summary>
    /// <param name="Target">Target environment</param>
    /// <returns>True on success</returns>
    public bool LoadBoostLib(ReadOnlyTargetRules Target)
    {
        bool isLibrarySupported = false;

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            isLibrarySupported = true;

            string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "x86";

            PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyPathBoostLib, "libboost_system-vc140-mt-1_59.lib"));
            PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyPathBoostLib, "libboost_chrono-vc140-mt-1_59.lib"));
            PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyPathBoostLib, "libboost_date_time-vc140-mt-1_59.lib"));
            PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyPathBoostLib, "libboost_regex-vc140-mt-1_59.lib"));
            PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyPathBoostLib, "libboost_thread-vc140-mt-1_59.lib"));
        }

        if (isLibrarySupported)
        {
            PublicIncludePaths.Add(ThirdPartyPathBoostInclude);
        }

        Definitions.Add(string.Format("WITH_BOOST_BINDING={0}", isLibrarySupported ? 1 : 0));

        return isLibrarySupported;
    }

    /// <summary>
    /// Load SmartFoxServer Client API library
    /// </summary>
    /// <param name="Target">Target environment</param>
    /// <returns>True on success</returns>
    public bool LoadSmartFoxClientAPILib(ReadOnlyTargetRules Target)
    {
        bool isLibrarySupported = false;

        if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
        {
            isLibrarySupported = true;

            string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "x86";

            //PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyPathSmartFoxClientAPILib, "zlibwapi.lib"));
            PublicAdditionalLibraries.Add(System.IO.Path.Combine(ThirdPartyPathSmartFoxClientAPILib, "SmartFoxClientApi.lib"));
        }

        if (isLibrarySupported)
        {
            // Include path
            PublicIncludePaths.Add(ThirdPartyPathSmartFoxClientAPIInclude);
        }

        Definitions.Add(string.Format("WITH_SMARTFOX_BINDING={0}", isLibrarySupported ? 1 : 0));

        return isLibrarySupported;
    }

    public Biscuit(ReadOnlyTargetRules Target) : base(Target)
    {
        PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay", "UMG" });

        // Load Boost library
        LoadBoostLib(Target);

        // Load SmartFoxClientAPI library
        LoadSmartFoxClientAPILib(Target);

        // Enable RTTI. This option is required from SmartFox API
        bUseRTTI = true;
    }
}


SfsChatWidget.h is a class created to expand the UI widget for the chat - Using the includes here is enough to break the project (it's the only other change I made in a completely vanilla project)

Code: Select all

// Fill out your copyright notice in the Description page of Project Settings.

#include "SfsChatWidget.h"

// -------------------------------------------------------------------------
// API includes
// -------------------------------------------------------------------------
#include "AllowWindowsPlatformTypes.h"

#include "F:/FlyingCookie/Biscuit/ThirdParty/SmartFoxClientAPI/SmartFox.h"
#include "F:/FlyingCookie/Biscuit/ThirdParty/SmartFoxClientAPI/Core/BaseEvent.h"
#include "F:/FlyingCookie/Biscuit/ThirdParty/SmartFoxClientAPI/Bitswarm/BitSwarmEvent.h"
#include "F:/FlyingCookie/Biscuit/ThirdParty/SmartFoxClientAPI/Util/EventDispatcher.h"
#include "F:/FlyingCookie/Biscuit/ThirdParty/SmartFoxClientAPI/Requests/LoginRequest.h"
#include "F:/FlyingCookie/Biscuit/ThirdParty/SmartFoxClientAPI/Util/SFSErrorCodes.h"
#include "F:/FlyingCookie/Biscuit/ThirdParty/SmartFoxClientAPI/Core/BoostAsio/Windows/boost/smart_ptr/shared_ptr.hpp"

#include "HideWindowsPlatformTypes.h"


This is basically a re-post but it breaks this way (UE4 compile log)

Code: Select all

Info Compiling game modules for hot reload
Info Parsing headers for BiscuitEditor
Info   Running UnrealHeaderTool "F:\FlyingCookie\Biscuit\Biscuit.uproject" "F:\FlyingCookie\Biscuit\Intermediate\Build\Win64\BiscuitEditor\Development\BiscuitEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
Info Reflection code generated for BiscuitEditor in 11.6537098 seconds
Info Performing 4 actions (4 in parallel)
Info Biscuit.generated.cpp
Info F:\FlyingCookie\Biscuit\Intermediate\Build\Win64\UE4Editor\Inc\Biscuit\Biscuit.generated.cpp: warning C4652: compiler option 'C++ Run-Time Type Identification Data' inconsistent with precompiled header; current command-line option will override that defined in the precompiled header
Info SfsChatWidget.cpp
Info F:\FlyingCookie\Biscuit\Source\Biscuit\SfsChatWidget.cpp: warning C4652: compiler option 'C++ Run-Time Type Identification Data' inconsistent with precompiled header; current command-line option will override that defined in the precompiled header
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/config/stdlib/dinkumware.hpp(99) : warning C4668: '_HAS_NAMESPACE' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/throw_exception.hpp(3) : warning C4668: '__GNUC__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/throw_exception.hpp(3) : warning C4668: '__GNUC_MINOR__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/predef/other/endian.h(151) : warning C4668: 'BOOST_ARCH_AMD64' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/smart_ptr/shared_ptr.hpp(777) : warning C4668: '__GNUC__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/exception/all.hpp(8) : warning C4668: '__GNUC__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/exception/all.hpp(8) : warning C4668: '__GNUC_MINOR__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/config.hpp(227) : warning C4005: 'BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT': macro redefinition
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/config.hpp(213) : note: see previous definition of 'BOOST_ASIO_ERROR_CATEGORY_NOEXCEPT'
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(36) : error C2039: 'InterlockedIncrement': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(36) : error C3861: 'InterlockedIncrement': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(40) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(40) : error C3861: 'InterlockedExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(46) : error C2039: 'InterlockedIncrement': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(46) : error C3861: 'InterlockedIncrement': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(48) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(48) : error C3861: 'InterlockedExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(54) : error C2039: 'InterlockedDecrement': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(54) : error C3861: 'InterlockedDecrement': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(62) : error C2039: 'InterlockedDecrement': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(62) : error C3861: 'InterlockedDecrement': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(67) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/winsock_init.ipp(67) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(84) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(84) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(90) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(90) : error C3861: 'InterlockedExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(96) : error C2039: 'InterlockedIncrement': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(96) : error C3861: 'InterlockedIncrement': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(102) : error C2039: 'InterlockedDecrement': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/win_iocp_io_service.hpp(102) : error C3861: 'InterlockedDecrement': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(51) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(51) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(56) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(56) : error C3861: 'InterlockedExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(93) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(93) : error C3861: 'InterlockedExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(102) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(102) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(112) : error C2039: 'InterlockedDecrement': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(112) : error C3861: 'InterlockedDecrement': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(125) : error C2039: 'InterlockedDecrement': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(125) : error C3861: 'InterlockedDecrement': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(153) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(153) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(172) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(172) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(187) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(187) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(206) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(206) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(221) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(221) : error C3861: 'InterlockedExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(223) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(223) : error C3861: 'InterlockedExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(247) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(247) : error C3861: 'InterlockedExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(268) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(268) : error C3861: 'InterlockedExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(279) : error C2039: 'InterlockedDecrement': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(279) : error C3861: 'InterlockedDecrement': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(286) : error C2039: 'InterlockedCompareExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(286) : error C3861: 'InterlockedCompareExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(295) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(295) : error C3861: 'InterlockedExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(319) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(319) : error C3861: 'InterlockedExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(341) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(341) : error C3861: 'InterlockedExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(350) : error C2039: 'InterlockedCompareExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(350) : error C3861: 'InterlockedCompareExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(399) : error C2039: 'InterlockedCompareExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(399) : error C3861: 'InterlockedCompareExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(434) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(434) : error C3861: 'InterlockedExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(438) : error C2039: 'InterlockedExchangeAdd': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(438) : error C3861: 'InterlockedExchangeAdd': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(441) : error C2039: 'InterlockedExchange': is not a member of '`global namespace''
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_io_service.ipp(441) : error C3861: 'InterlockedExchange': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_socket_service_base.ipp(211) : warning C4191: 'type cast': unsafe conversion from 'FARPROC' to 'cancel_io_ex_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_socket_service_base.ipp(713) : error C3861: 'InterlockedCompareExchangePointer': identifier not found
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/asio/detail/impl/win_iocp_handle_service.ipp(244) : warning C4191: 'type cast': unsafe conversion from 'FARPROC' to 'cancel_io_ex_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/thread/win32/thread_primitives.hpp(312) : warning C4191: 'type cast': unsafe conversion from 'boost::detail::win32::farproc_t' to 'boost::detail::win32::detail::gettickcount64_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/ratio/config.hpp(16) : warning C4668: '__GNUC__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/smart_ptr/intrusive_ptr.hpp(223) : warning C4668: '__GNUC__' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif'
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(1627) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtQuerySystemInformation_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(1834) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtSetInformationFile_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(1836) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtQueryObject_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(1908) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtOpenFile_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(1909) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtClose_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(2288) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtQuerySection_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(2301) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtQuerySemaphore_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(2312) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtQueryTimerResolution_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(2319) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::NtSetTimerResolution_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(2326) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::QueryPerformanceCounter_t'
Info         Calling this function through the result pointer may cause your program to fail
Error F:\FlyingCookie\Biscuit\ThirdParty\SmartFoxClientAPI\Core\BoostAsio\Windows\boost/interprocess/detail/win32_api.hpp(2333) : warning C4191: 'type cast': unsafe conversion from 'boost::interprocess::winapi::farproc_t' to 'boost::interprocess::winapi::QueryPerformanceFrequency_t'
Info         Calling this function through the result pointer may cause your program to fail
Info ERROR: UBT ERROR: Failed to produce item: F:\FlyingCookie\Biscuit\Binaries\Win64\UE4Editor-Biscuit-6440.dll
Info Total build time: 60.96 seconds (Local executor: 0.00 seconds)



Not sure if this is relevant but while compiling the SmartFoxClientAPI in VS2017 it is successfully compiled but has quite some warnings this is the log

I've uploaded it into a random site since the forum doesn't allow me to upload a .txt file and the post would exceed the characters limit...
VS2017 Compile log


Oh and just a tip for anyone who happens to stumble upon this, Don't install both VS2015 and VS2017, it breaks the PATH of the compilers. I wasn't able to fix it even by making a system restore to a point before I installed VS2015 and ended up having to format my main Drive with a new windows install. Wasn't awful for me since I wanted to change to W10 but for most people it's prolly a pain so :wink:
User avatar
Lapo
Site Admin
Posts: 19759
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: 1.7.3 C++ on UE4 Boost Libs wont compile

Postby Lapo » 30 Jun 2017, 07:33

Thanks for clarifying.
Did you check the UE4 example we provide at the bottom of this page?
http://smartfoxserver.com/download/sfs2x#p=examples
It comes with a tutorial with the details of how to setup the UE4 project. Did you follow it?

Cheers

p.s. = I don't think the compiler warnings should be an issue.
Lapo

--

gotoAndPlay()

...addicted to flash games
Heaven
Posts: 10
Joined: 28 Jun 2017, 21:07

Re: 1.7.3 C++ on UE4 Boost Libs wont compile

Postby Heaven » 30 Jun 2017, 11:05

Yes, I said I was following it,

I'm following the proff of concept pdf and basing it of the example code.


Unreal Engine proof of concept
Version: 1.0.0
Release date: Jun 30th, 2015


It might be because of how U4 runs the compiler:

Info Running UnrealHeaderTool "F:\FlyingCookie\Biscuit\Biscuit.uproject" "F:\FlyingCookie\Biscuit\Intermediate\Build\Win64\BiscuitEditor\Development\BiscuitEditor.uhtmanifest" -LogCmds="loginit warning, logexit warning, logdatabase error" -Unattended -WarningsAsErrors -installed
Info Reflection code generated for BiscuitEditor in 11.6537098 seconds


I really need your help...
User avatar
Lapo
Site Admin
Posts: 19759
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: 1.7.3 C++ on UE4 Boost Libs wont compile

Postby Lapo » 30 Jun 2017, 13:51

Hi,
I am no UE expert but, is it possible to remove that switch so that Warnings won't stop the compilation?
Maybe that's the problem.

I have forwarded this conversation to our C++ expert, if he has any ideas he will chime in.

Cheers
Lapo

--

gotoAndPlay()

...addicted to flash games
Heaven
Posts: 10
Joined: 28 Jun 2017, 21:07

Re: 1.7.3 C++ on UE4 Boost Libs wont compile

Postby Heaven » 02 Jul 2017, 18:55

So time for update:

Managed to fix the previous errors:

Code: Select all

#include "AllowWindowsPlatformTypes.h"

Don't use that it breaks the name spaces for the boost library it seems.

To use RTTI on UE 4.16 you need to add the following code to ProjectName.Target.cs

Code: Select all

UEBuildConfiguration.bForceEnableRTTI = true;


Note that you still have to add

Code: Select all

        bUseRTTI = true;
to the ProjectName.Build.cs

Code: Select all

    public ProjectName(ReadOnlyTargetRules Target) : base(Target)
   {
      PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "HeadMountedDisplay" });

        // Load Boost library
        LoadBoostLib(Target);

        // Load SmartFoxClientAPI library
        LoadSmartFoxClientAPILib(Target);

   // Enable RTTI
        bUseRTTI = true;

    }


Now for some update on the errors:

Also had the same error with OpenSSL Classes but managed to fix it by loading OpenSSL as a External Lib (Same way as SfsClientAPI and Boost)

Loading ZLib the same way doesn't seem to fix the problem...

Code: Select all

Info Compiling game modules for hot reload
Info Performing 1 actions (4 in parallel)
Info [1/1] Link UE4Editor-Biscuit-6145.dll
Info SmartFoxClientApi.lib(CryptoInitializer.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
Info    Creating library F:\FlyingCookie\Biscuit\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Biscuit-6145.suppressed.lib and object F:\FlyingCookie\Biscuit\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Biscuit-6145.suppressed.exp
Error BiscuitCharacter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl Sfs2X::Requests::PublicMessageRequest::PublicMessageRequest(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (__imp_??0PublicMessageRequest@Requests@Sfs2X@@QEAA@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
Error BiscuitCharacter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl Sfs2X::Requests::PublicMessageRequest::~PublicMessageRequest(void)" (__imp_??1PublicMessageRequest@Requests@Sfs2X@@UEAA@XZ)
Error SmartFoxClientApi.lib(deflate.obj) : error LNK2001: unresolved external symbol match_init
Error SmartFoxClientApi.lib(deflate.obj) : error LNK2001: unresolved external symbol longest_match
Error SmartFoxClientApi.lib(inffas8664.obj) : error LNK2001: unresolved external symbol inffas8664fnc
Error F:\FlyingCookie\Biscuit\Binaries\Win64\UE4Editor-Biscuit-6145.dll : fatal error LNK1120: 5 unresolved externals
Info ERROR: UBT ERROR: Failed to produce item: F:\FlyingCookie\Biscuit\Binaries\Win64\UE4Editor-Biscuit-6145.dll
Info Total build time: 11.03 seconds (Local executor: 0.00 seconds)
Heaven
Posts: 10
Joined: 28 Jun 2017, 21:07

Re: 1.7.3 C++ on UE4 Boost Libs wont compile

Postby Heaven » 02 Jul 2017, 22:21

Moar updates:

I was able to solve the problems related to the zLib by besides loading it as an external library adding as an header

Code: Select all

#include <iostream>


"only" two problems atm

Code: Select all

Info Compiling game modules for hot reload
Info Performing 1 actions (4 in parallel)
Info [1/1] Link UE4Editor-Biscuit-6344.dll
Info SmartFoxClientApi.lib(CryptoInitializer.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
Info    Creating library F:\FlyingCookie\Biscuit\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Biscuit-6344.suppressed.lib and object F:\FlyingCookie\Biscuit\Intermediate\Build\Win64\UE4Editor\Development\UE4Editor-Biscuit-6344.suppressed.exp
Error BiscuitCharacter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __cdecl Sfs2X::Requests::PublicMessageRequest::PublicMessageRequest(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (__imp_??0PublicMessageRequest@Requests@Sfs2X@@QEAA@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
Error BiscuitCharacter.cpp.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __cdecl Sfs2X::Requests::PublicMessageRequest::~PublicMessageRequest(void)" (__imp_??1PublicMessageRequest@Requests@Sfs2X@@UEAA@XZ)
Error F:\FlyingCookie\Biscuit\Binaries\Win64\UE4Editor-Biscuit-6344.dll : fatal error LNK1120: 2 unresolved externals
Info ERROR: UBT ERROR: Failed to produce item: F:\FlyingCookie\Biscuit\Binaries\Win64\UE4Editor-Biscuit-6344.dll
Info Total build time: 14.26 seconds (Local executor: 0.00 seconds)


These seem related to the api directly, I have no idea where to even start solving them ><

Edit:
Also it is relevant to say that I've already got most of the code needed for the chat app to work, UE4 seems unable to build it's external Library for SmartFoxClientAPI
Heaven
Posts: 10
Joined: 28 Jun 2017, 21:07

Re: 1.7.3 C++ on UE4 Boost Libs wont compile

Postby Heaven » 04 Jul 2017, 16:16

A plea for help and update:

Managed to get it to compile after much much pain, only to find out that something must have changed with the RTTI and UE that makes this code crash the Editor.

What did I do?
:arrow: Comment out this (I was just trying to get it to compile there might be a problem with the class SmartFoxPublicMessageRequest)

Code: Select all

void ABiscuitCharacter::SmartFoxSendChatMessage(string message)
{
   //m_ptrSmartFoxPublicMessageRequest = boost::shared_ptr<IRequest>(new PublicMessageRequest(message));
   //m_ptrSmartFox->Send(m_ptrSmartFoxPublicMessageRequest);
}


:arrow: An Option has to be changed in zLib project in the SmartFoxClientAPI in OutputFiles:AssemblerOutput to NoListing Or the UE4 will give a compile error looking for a file.cop that is not built

:arrow: I've Recompiled the most recent boost libs (if you do so don't forget to change the check() macro in slist.hpp in the intrusive lib) this doesn't seem to change anything it was just one of those things I tried but the project that had progress was the one with the most recent ones so ended up keeping it. Oh the filesystem lib seems redundant but the UE4 keeps asking me for it even if I comment out the PublicAdditionalLibraries.Add So I kept it there... probably an include I have to remove.

Anyhow the problem now is that the UE4 now crashes the editor as soon as it compiles with this Stacktrace

Code: Select all

Fatal error: [File:D:\Build\++UE4+Release-4.16+Compile\Sync\Engine\Source\Runtime\CoreUObject\Private\UObject\UObjectGlobals.cpp] [Line: 2795]
Function failed to route PostInitProperties. Call Super::PostInitProperties() in Function::PostInitProperties().


KERNELBASE.dll!0x00000000DF379E08
UE4Editor-Core.dll!0x00000000BC35AF9E
UE4Editor-Core.dll!0x00000000BC17243B
UE4Editor-Core.dll!0x00000000BC1007E9
UE4Editor-CoreUObject.dll!0x00000000B8E3DC3B
UE4Editor-CoreUObject.dll!0x00000000B8E11F6B
UE4Editor-Biscuit-1796.dll!Z_Construct_UFunction_USfsChatWidget_ChatMessageEvent()
UE4Editor-Biscuit-1796.dll!Z_Construct_UClass_USfsChatWidget()
UE4Editor-CoreUObject.dll!0x00000000B8E5ACAC
UE4Editor-CoreUObject.dll!0x00000000B8E3EAA3
UE4Editor-CoreUObject.dll!0x00000000B8BF5CE7
UE4Editor-Core.dll!0x00000000BBFAF6C0
UE4Editor-Core.dll!0x00000000BC2037E0
UE4Editor-Core.dll!0x00000000BC202970
UE4Editor-HotReload.dll!0x000000008BA12A1E
UE4Editor-HotReload.dll!0x000000008BA10024
UE4Editor-HotReload.dll!0x000000008BA109F0
UE4Editor-HotReload.dll!0x000000008BA22E9B
UE4Editor-UnrealEd.dll!0x00000000A4671FAE
UE4Editor-UnrealEd.dll!0x00000000A4E98D76
UE4Editor.exe!0x0000000078F9E2B2
UE4Editor.exe!0x0000000078F8F0B0
UE4Editor.exe!0x0000000078F8F12A
UE4Editor.exe!0x0000000078FA0CF9
UE4Editor.exe!0x0000000078FA25F7
KERNEL32.DLL!0x00000000E2592774
ntdll.dll!0x00000000E2DA0D61
ntdll.dll!0x00000000E2DA0D61


This error seems related to the RTTI trusting this reference UE4 answer

This function is the one that seems to crash it

Code: Select all

   UFUNCTION(BlueprintImplementableEvent, Category = ViewMode)
      void ChatMessageEvent(const FString &message);


I am now way beyond my head and my short knowledge in C++ and will drop the case unless I get some help.

Attached is the source folder in my Project that made the successful build although it crashed the Editor permanently.

Regards
Attachments
Source.7z
Source Code for UE4 4.16.2
(7.68 KiB) Downloaded 22 times
MBagnati
Posts: 125
Joined: 12 Feb 2013, 10:57

Re: 1.7.3 C++ on UE4 Boost Libs wont compile

Postby MBagnati » 04 Jul 2017, 16:48

Hi,
To fix the PublicMessageRequest error please try this suggestion:

Edit SmartFox API file [api]\Util\Common.h at line 19

Change

Code: Select all

// -------------------------------------------------------------------
// Define alias to mark exported/imported library items
// -------------------------------------------------------------------
#if defined WIN32
#if defined SMARTFOXCLIENTAPI_EXPORTS
    #define DLLImportExport __declspec(dllexport)
#else
    #define DLLImportExport __declspec(dllimport)
#endif
#else
#define DLLImportExport
#endif


into

Code: Select all

// -------------------------------------------------------------------
// Define alias to mark exported/imported library items
// -------------------------------------------------------------------
#if defined SMARTFOXCLIENTAPI_EXPORTS
    #define DLLImportExport __declspec(dllexport)
#else
    #define DLLImportExport __declspec(dllimport)
#endif


and re-build the SmartFox API
The linker should now recognize the PublicMessageRequest
Heaven
Posts: 10
Joined: 28 Jun 2017, 21:07

Re: 1.7.3 C++ on UE4 Boost Libs wont compile

Postby Heaven » 04 Jul 2017, 19:57

Yeep, that fixed it.

Problem now is the UE4 itself and the crashing. Nice quick fix ^^
User avatar
Lapo
Site Admin
Posts: 19759
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: 1.7.3 C++ on UE4 Boost Libs wont compile

Postby Lapo » 05 Jul 2017, 08:27

Heaven wrote:Yeep, that fixed it.

Problem now is the UE4 itself and the crashing. Nice quick fix ^^

Just to clarify, is it our vanilla proof of concept/example that crashes or is it after some modification that you got the crash problem?

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
Heaven
Posts: 10
Joined: 28 Jun 2017, 21:07

Re: 1.7.3 C++ on UE4 Boost Libs wont compile

Postby Heaven » 07 Jul 2017, 00:18

Yes the project is broken I think.

I'm not yet knowledgeable enough to get it working, tried writing a plugin for it, i compiles fine but ends up doing the same problem.

FYI with the plugin:

:arrow: after it compiles and I have the plugin running in RTTI and the Game project running in non RTTI it builds so long as I don't include any header that is linked to the boost libs.

:arrow: If I Enable RTTI on the Game project it will not fail in the Build and will compile even with hooked up Events, problem is that the editor will become broken and crash while Loading (@71%)
It is the same stack trace as if I had included it directly.


I was trying to have a non UCLASS make the bridge between the plugin and the UCLASS with the UObjects but I?m having type problems and can't get it to compile...
Never thought the UE4 header system could be so annoying and hard to work with... might be my own ignorance to blame but it felt much easier to write the plugin where I didn't have to deal with their types and macros ><

Cheers

Edit: oh just re read you question and noticed I read i wrong the first time around xD

I think there is no way the vanilla project will be loaded out of the box, it's extremely outdated...

All the modifications I did was to try to get it working without changing the concept at all... I did use a Top-Down project instead of the Third Person the old project is built on but the only difference was that I used the BeginPlay() override instead of the of ReceiveBeginPlay() the project used.

If you check the source code I posted above and compare it to the one on the example you'll see it is mostly similar.

I think the ReceiveBeginPlay() was probably deprecated or the name was changed or mb it is not on my template... Either way I wrote the Plugin in a Basic Code project and the behavior was similar (I didn't try to crash the editor there).

I have nothing that leads me to believe it would be any different if I tried crashing the editor there...
User avatar
Lapo
Site Admin
Posts: 19759
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: 1.7.3 C++ on UE4 Boost Libs wont compile

Postby Lapo » 07 Jul 2017, 08:24

Thanks,
we're investigating the issue under the new UE4.

Stay tuned
Lapo

--

gotoAndPlay()

...addicted to flash games
MBagnati
Posts: 125
Joined: 12 Feb 2013, 10:57

Re: 1.7.3 C++ on UE4 Boost Libs wont compile

Postby MBagnati » 23 Jul 2017, 18:03

Hi,
I have rewritten the Unreal Engine proof of concept starting from a blank sheet.
I have written the code for the last version of Unreal Engine (rel. 4.16) and VisualStudio 2015.
The result of my work is a sample game that is successfully built by UE4 Editor and VisualStudio 2015 but it goes on fault when it tries to execute the SmartFox Login request.
The reason of the crash is that SmartFox API need of the RTTI while UE4 engine does not want it.
At the moment I have found only this suggestion about the issue https://answers.unrealengine.com/questi ... -rtti.html
(see the answer with green background)
I have not yet followed the suggestion about the creation of a separate wrapper

Return to “SFS2X C++ API”

Who is online

Users browsing this forum: No registered users and 3 guests