asio
asio copied to clipboard
Are there ASIO compile for QNX platform relevant document?
I want to compile ASIO lib for QNX platform, but there are many errors in compilation. Are there ASIO compile for QNX platform relevant document?
I am also curious about this. I cannot build asio in qnx 7.0 toolchain. Is the problem about me doing things wrong? Or does ASIO not support QNX 7.0 toolchain? thanks a lot
What kind of API does qnx provide, what compiler is it using and what errors do you get?
I am trying to compile the code in WSL2 by using VsCode. QNX provides a toolchain for linux hosts, which includes qcc & q++ compile commands for C & C++. As far as I can see, QNX SDP(software development platform) 7.0 provides its qcc&q++ which use GCC 5.4. At least this is how VsCode recognize them. When I build with GCC 9.4.0, there are no issues. However, When I tried to build with qcc&q++, I get several errors, some of them are as follows:
xxx/asio/include/asio/detail/handler_alloc_helpers.hpp:257:38: error: no matching function for call to 'std::__1::allocator_traits<asio::detail::recycling_allocator
^
xxx/asio/include/asio/detail/handler_alloc_helpers.hpp:258:27: error: 'struct std::__1::allocator_traits<asio::detail::recycling_allocator
^
error: no matching function for call to 'std::__1::allocator_traits<asio::detail::recycling_allocator
^
I hope I can provide sound information concerning my problem. Thanks in advance
it looks like that particular feature requires c++11. Are you setting the std to 11 with "-std=c++11"?
actually trying to build with -std=c++17, but I think that this is also ok, right?
I think I found my issue. looks like qcc comes with two different standard libs: GNU and LLVM.
When I add
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Y_gpp") to my cmake file, it sets to the GNU C++ library, and now it seems that all is well.
Thanks for your thoughts.
Note: I found the solution from : https://discourse.cmake.org/t/qnx-cmake-build/1309