Support for C++20 #68130
Unanswered
TorstenRobitzki
asked this question in
Q&A
Support for C++20
#68130
Replies: 2 comments
-
Any update on this? |
Beta Was this translation helpful? Give feedback.
0 replies
-
I gave up on this as the purpose of having libraries is usually to link them to different executables. As Zephyr seems to not support multiple executables, I came up with this workaround: #69029 Which feels totally wrong, as CMake has all the required features and then, you throw away everything and build some crapy replacement on top of it. OBJECT libraries could work, as they are not really libraries, but lists of object files that are handled by CMake. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I would love to use the C++20 features of the compiler I'm using (gcc 12.2.1). The relevant parts of my
prj.conf
looks like this:However, when I compile C++ code, there is no switch passed to the compiler, selecting
C++20
. When I add:to the CMakeLists.txt file, I get the required compiler switch (-std=gnu++20). I wonder, if this is really necessary.
The second thing is, that when I load of some sources into a static library target and add them as
target_link_library
to theapp
target, I get error when linking:When I'm adding the sources to the
app
target, that I do not see this linker errors.What am I'm doing wrong here?
Thanks in advance,
Torsten
Beta Was this translation helpful? Give feedback.
All reactions