On Wed, 9 Feb 2022, 11:46 christinefragoso--- via Devel,
I want to run my C++ project in a camkes image for i.mx6. This image should be statically linked.
I have a camkes app in https://github.com/seL4/camkes-manifest. The app's CMakeLists.txt includes my project with add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/workspace_DDSHelloWorld"), which is a simple DDS example https://fast-dds.docs.eprosima.com/en/latest/fastdds/getting_started/simple_... that also uses CMake as its build system. The entire app is built with ../init-build.sh -DPLATFORM=sabre -DCAMKES_APP=dds.
However, the build fails. 1. My project includes
, but sel4 uses the -nostdinc and -nostdinc++ flags, so I get the error "stdint.h: No such file or directory". How do I make my C++ project include seL4's musllibc instead?
The muslc library should be a link dependency and it's headers available to include if the component is being built as a camkes component. If it's include paths aren't showing up on the command line then you could try explicitly adding it. It's "muslc" within the cmake project scope so adding it as a link dependency on your library may be what's missing. 2. My project includes other C++ headers like <functional>. Is there any
way to build seL4 with C++ headers?
Others appear to have been successful with this in the past without significant additional effort. You need to add the include paths for C++ headers and link arguments manually. Either by creating a cmake imported library and doing the same thing as muslc or by just adding include paths and link arguments to the target you want to compile with C++. Sorry this is a bit vague, but I've not set C++ up for seL4 before myself. The sel4test project compiles a test with C++ but it doesn't use C++ standard headers. _______________________________________________
Devel mailing list -- devel@sel4.systems To unsubscribe send an email to devel-leave@sel4.systems