Hello Nuno, It is better to post here the cmake files and the compilation execution.
Now looking at your first email, it seems that the function 'at_quick_exit' cannot be found by the linker. You can look at NuttX code (app and nuttx) and see where this function is and who is complaining. For a first implementation, maybe the linked library does not need the library that is causing the issue can be removed. It can be: * function not compiled during make export * function not found by cmake-generated linker rule - the order of the libraries call is important - when I did for stm32, I looked at the linker call when building standard NuttX to make the same on Cmake Hope it helps. Best regards, Flavio Em qui., 11 de nov. de 2021 às 22:50, Nuno Barcellos <nunobarcel...@gmail.com> escreveu: > > Yes, it does. It generates the nuttx-export.zip. Then I set cmake to: > > include_directories: > nuttx-export/include > nuttx-export/include/libcxx > nuttx-export/arch/chip > > target_link_libraries: > libs under nuttx-export/libs > > And set the compiler and linker flags at nuttx-export/scripts/Make.defs > > Nuno > > > Em qui., 11 de nov. de 2021 às 22:15, Flavio Castro Alves Filho < > flavio.al...@gmail.com> escreveu: > > > Hi Nuno, > > > > So when you run 'make export' the build runs correctly, right? > > > > Best regards, > > > > Flavio > > > > Em qui., 11 de nov. de 2021 às 21:14, Nuno Barcellos > > <nunobarcel...@gmail.com> escreveu: > > > > > > Hey Flavio :) > > > > > > Yes, I can build and run the helloxx example when it is inside the > > > nuttx/apps tree (I've been using sim:libcxxtest configuration). > > > > > > I'm having problems when trying to build it outside the nuttx tree by > > using > > > the nuttx-as-library (make export). > > > I followed the C++ CMake example in the documentation and was able to get > > > it working on an STM32 target. > > > However, the build error I mentioned comes up when I set the target to > > the > > > simulator. > > > > > > I'm not sure if the cmake toolchain is set correctly. I'm using: > > > > > > set(CMAKE_SYSTEM_NAME Linux) > > > set(CMAKE_SYSTEM_PROCESSOR sim) > > > > > > and set the compiler and tools to standard g++. > > > > > > Cheers, > > > Nuno > > > > > > > > > > > > Em qui., 11 de nov. de 2021 às 20:42, Flavio Castro Alves Filho < > > > flavio.al...@gmail.com> escreveu: > > > > > > > Hello Nuno, > > > > > > > > Before starting working with cmake, it is important that the C++ > > > > configuration in nuttx is building and running. > > > > > > > > Did you get this part working? > > > > > > > > Best regards, > > > > > > > > Flavio > > > > > > > > Em qui., 11 de nov. de 2021 19:17, Nuno Barcellos < > > nunobarcel...@gmail.com > > > > > > > > > escreveu: > > > > > > > > > Hello! > > > > > > > > > > Could anyone get the C++ CMake HelloWorld example working for the > > > > > simulator? > > > > > I'm using the sim:libcxxtest config but am getting the following > > error: > > > > > > > > > > nuttx-export/include/libcxx/cstdlib:154:9: error: ‘::at_quick_exit’ > > has > > > > not > > > > > been declared > > > > > 154 | using ::at_quick_exit; > > > > > > > > > > Thanks, > > > > > Nuno > > > > > > > > > > > > > > > > > > -- > > > Nuno Bernardes Barcellos > > > *Politecnico di Milano & University of São Paulo* > > > M.Sc. in Electronics Engineering > > > +5534988273589 <+393896649806> | nunobarcel...@gmail.com > > > > > > > > -- > > Flavio de Castro Alves Filho > > > > flavio.al...@gmail.com > > Twitter: http://twitter.com/#!/fraviofii > > LinkedIn profile: www.linkedin.com/in/flaviocastroalves -- Flavio de Castro Alves Filho flavio.al...@gmail.com Twitter: http://twitter.com/#!/fraviofii LinkedIn profile: www.linkedin.com/in/flaviocastroalves