I have C++ code that builds successfully on seL4, but I have to make some changes to a couple of header files that did not contain a __cplusplus guard around some prototype declarations (that was causing the compiler to report an error as it was seeing the same function with two difference linkage attributes). The files I have to change are: - kernel/libsel4/include/sel4/assert.h - Added C++ guard at the beginning & at the end. - kernel/libsel4/arch_include/arm/sel4/arch/syscalls.h - Added C++ guard around the strcpy prototype definition (only)
The two files would declare functions that were also defined as "extern C" in the muslibc headers (and that were included from different files). Note: I'm using an older version of seL4 (version 8), so I don't know if the same changes apply to the latest one. Regards, Fabrizio On Wed, Dec 2, 2020 at 3:53 AM Kent Mcleod <[email protected]> wrote: > There isn't a lot of built in support for C++ that I'm aware of. > There's a single source file in sel4test, domain.cxx > ( > https://github.com/seL4/sel4test/blob/master/apps/sel4test-tests/src/tests/domains.cxx > ) > that is used to test c++ compiler support but it doesn't use many > language features and doesn't include or link against any libstdc++ > sources. Historically, people have been able to get many C++ features > working during the AOS course, but I'm not aware of any public > solutions. > > On Mon, Nov 30, 2020 at 9:56 PM yadong.li <[email protected]> wrote: > > > > Hi, > > I have two questions about whether seL4 support C++: > > > > 1. When we create a component, whether the src file of component > can be c++ style file like **.cxx, or **.cpp ? > > I found it will print “camkes.environment.c : undefined reference to > run” error when compile > > > > 2. If our app code write by c++, how can I use it in seL4 > environment as native component?Is there some example ? > > Thank you very much. > > _______________________________________________ > > Devel mailing list -- [email protected] > > To unsubscribe send an email to [email protected] > _______________________________________________ > Devel mailing list -- [email protected] > To unsubscribe send an email to [email protected] > _______________________________________________ Devel mailing list -- [email protected] To unsubscribe send an email to [email protected]
