flavioipiranga edited a comment on issue #5530:
URL:
https://github.com/apache/incubator-nuttx/issues/5530#issuecomment-1046021255
I've made some changes based at what you mentioned and the discussion at the
link.
First I added the #define __NuttX__ at the CMakeLists.txt here:
`set(AC_DEFINES "${AC_DEFINES} -D__NuttX__ -DCONFIG_WCHAR_BUILTIN")`
This solves the question about error: #error "No thread API".
After this, I had an error about the lsupc++ lib. Looking at NuttX
repository for this lib, I found out there is a config LIBSUPCXX to enable this
lib.
So I enabled this config using:
`make menuconfig`
With this config enabled I ran:
`./tools/configure.sh stm32f4discovery:testlibcxx`
`make export`
Following the steps mentioned at the example guide, new error appeared:
`arm-none-eabi-objcopy: '/nuttxspace/hellocpp/build/hellocpp.elf': No such
file`
I don't know why hellocpp.elf is generated inside src folder, but after
copying from src to build folder I have the following result:
```
[ 33%] Linking CXX executable hellocpp
[100%] Built target hellocpp
```
The final result at build folder:
```
/nuttxspace/hellocpp/build$ ls
CMakeCache.txt CMakeFiles cmake_install.cmake hellocpp.bin hellocpp.elf
Makefile src
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]