Closed SebastianKunz closed 2 years ago
@SebastianKunz Sid you find a solution?
Sadly no.
closing. this platform not supported by spdlog. If you happen find a solution please update here anyway.
Just got this working on QNX 7.1 by setting the following in my CMakeLists.txt before adding spdlog:
add_compile_definitions(_QNX_SOURCE)
See http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.prog/topic/devel_ConformingToStandards.html for more info.
这是有效的,此外也可以这么写(-std=gnu++17
不是必须的)-D_QNX_SOURCE
:
_This is valid, and can also be written like this (-std=gnu++17
is not required) -D_QNX_SOURCE
:_
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++17 -D_QNX_SOURCE")
编译参数配置,经测试,无法指定C++标准,否则无法识别boost 详情参考 http://www.qnx.com/developers/docs/7.0.0/#com.qnx.doc.neutrino.utilities/topic/q/qcc.html <-std=language> 此选项还有其他变体可以启用特定于供应商的编译器扩展: gnu99 、 gnu11 、 gnu++98 、 gnu++11 、 gnu++14 和 gnu++17 。 如果您使用这些变体,则会自动定义 _QNX_SOURCE,并启用编译器的一些其他非标准功能;请参阅海湾合作委员会文档。 如果不指定 -std,则 C 和 C++ 的默认值分别为 gnu11 和 gnu++14 。 参见 http://www.qnx.com/developers/docs/7.0.0/index.html#com.qnx.doc.neutrino.prog/topic/devel_ConformingToStandards.html 如果要符合给定的语言标准,可以对 qcc 使用 -std=language 选项。 此选项可能会导致头文件的某些部分被省略,这可能会导致问题,因为由 POSIX 定义的函数或特定于 QNX Neutrino 的函数不会被定义。
Im interested in using spdlog with qnx 7.0.0. Currently I'm using the header only version, which works great, except that my compile time is now +10 seconds. Thats why I checked out the static library approach, but I am stuck. Here is what I did. I compiled spdlog like described in the readme. Then qnx screamed at me, because of an
unrecognized-relocation-0x2a-in-section-text-5565
, and this stackoverflow article explains why. So I tried to use the QNX qcc compiler, which cmake does not know. I also looked at #738, but it didnt help me.Has anyone had any chance at compiling spdlog with qnx 700 and can explain to me how to reproduce? I am still a newbie regarding qnx, so please bear with me.
Thanks