[native_sim] Linking a shared C++ zephyr library with STL. #94615
Replies: 3 comments
-
@JaagupAverin please try to simplify the issue into a simpler reproduction case and be clearer about what happens and what you expected. |
Beta Was this translation helpful? Give feedback.
-
If this should be possible, then I will make a small reproducible example and raise it as a bug. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a zephyr library that is defined as:
Which is a helper library used by both core firmwares.
When the library does not contain any STL code, it builds and links nicely into both firmwares, and finally into the native_sim zephyr.exe, and is executed properly.
However, when adding any C++ STL code such as std::string, std::string_view, std::function, etc to the shared library, I get linker errors when linking the final zephyr.exe.
e.g when trying to use std::function in this library, the final link fails with:
I understand that C++ support in Zephyr is not as robust as C. Is what I am trying to accomplish possible with some adjustments, or is this a bug/unsupported feature?
Best,
Jaagup
Beta Was this translation helpful? Give feedback.
All reactions