Good news. It will be great if you can document your experience in the
Documentation folder when you find some free time.

On Wed, Mar 17, 2021 at 9:54 PM Flavio Castro Alves Filho <
flavio.al...@gmail.com> wrote:

> Hello Xiang,
>
> I could finally build an C++ project using CMake and exported NuttX.
>   - Before that, I made a test creating the same project inside the
> NuttX apps structure, and it worked fine.
>
> My sample project is here:
> https://github.com/Phi-Innovations/nuttx-apps/tree/main/hellocpp
>
> I compiled JsonCpp (https://github.com/nlohmann/json) together and it
> worked fine.
>
> Thank you for all your support.
>
> Best regards,
>
> Flavio
>
>
> Em ter., 16 de mar. de 2021 às 21:04, Flavio Castro Alves Filho
> <flavio.al...@gmail.com> escreveu:
> >
> > Xiang,
> >
> > I believe the problem was related to something on my branch.
> >
> > I was using a quite old version, based on release 10 branch.
> >
> > Now using master as branch, the testlibcxx compiled correctly.
> > Tomorrow I will try my experiments and report here.
> >
> > Best regards,
> >
> > Flavio
> >
> > Em ter., 16 de mar. de 2021 às 16:24, Xiang Xiao
> > <xiaoxiang781...@gmail.com> escreveu:
> > >
> > > Try to remove CONFIG_ARCH_FLOAT_H
> > >
> > > On Tue, Mar 16, 2021 at 12:15 PM Flavio Castro Alves Filho <
> > > flavio.al...@gmail.com> wrote:
> > >
> > > > Hello Xiang,
> > > >
> > > > It is still not working. The error persists.
> > > >
> > > > Here is my defconfig file:
> > > >
> > > > #
> > > > # This file is autogenerated: PLEASE DO NOT EDIT IT.
> > > > #
> > > > # You can use "make menuconfig" to make any modifications to the
> > > > installed .config file.
> > > > # You can then do "make savedefconfig" to generate a new defconfig
> > > > file that includes your
> > > > # modifications.
> > > > #
> > > > # CONFIG_ARCH_FPU is not set
> > > > CONFIG_ARCH="arm"
> > > > CONFIG_ARCH_BOARD="stm32f4discovery"
> > > > CONFIG_ARCH_BOARD_STM32F4_DISCOVERY=y
> > > > CONFIG_ARCH_CHIP="stm32"
> > > > CONFIG_ARCH_CHIP_STM32=y
> > > > CONFIG_ARCH_CHIP_STM32F407VG=y
> > > > CONFIG_ARCH_FLOAT_H=y
> > > > CONFIG_ARCH_STACKDUMP=y
> > > > CONFIG_BOARD_LOOPSPERMSEC=16717
> > > > CONFIG_BUILTIN=y
> > > > CONFIG_C99_BOOL8=y
> > > > CONFIG_DISABLE_MOUNTPOINT=y
> > > > CONFIG_EXAMPLES_HELLOXX=y
> > > > CONFIG_HAVE_CXX=y
> > > > CONFIG_INTELHEX_BINARY=y
> > > > CONFIG_LIBCXX=y
> > > > CONFIG_LIBC_FLOATINGPOINT=y
> > > > CONFIG_LIBC_LOCALTIME=y
> > > > CONFIG_MAX_TASKS=16
> > > > CONFIG_MM_REGIONS=2
> > > > CONFIG_NFILE_DESCRIPTORS=8
> > > > CONFIG_NSH_BUILTIN_APPS=y
> > > > CONFIG_NSH_FILEIOSIZE=512
> > > > CONFIG_PREALLOC_TIMERS=4
> > > > CONFIG_RAM_SIZE=114688
> > > > CONFIG_RAM_START=0x20000000
> > > > CONFIG_RAW_BINARY=y
> > > > CONFIG_RR_INTERVAL=200
> > > > CONFIG_SCHED_ONEXIT=y
> > > > CONFIG_SCHED_ONEXIT_MAX=4
> > > > CONFIG_SCHED_WAITPID=y
> > > > CONFIG_SDCLONE_DISABLE=y
> > > > CONFIG_START_DAY=2
> > > > CONFIG_START_MONTH=11
> > > > CONFIG_START_YEAR=2012
> > > > CONFIG_STM32_JTAG_SW_ENABLE=y
> > > > CONFIG_STM32_USART2=y
> > > > CONFIG_SYMTAB_ORDEREDBYNAME=y
> > > > CONFIG_SYSTEM_NSH=y
> > > > CONFIG_USART2_RXBUFSIZE=128
> > > > CONFIG_USART2_SERIAL_CONSOLE=y
> > > > CONFIG_USART2_TXBUFSIZE=128
> > > > CONFIG_USER_ENTRYPOINT="nsh_main"
> > > >
> > > > Any idea of what is missing?
> > > >
> > > > Best regards,
> > > >
> > > > Flavio
> > > >
> > > > Em ter., 16 de mar. de 2021 às 14:32, Xiang Xiao
> > > > <xiaoxiang781...@gmail.com> escreveu:
> > > > >
> > > > > On Tue, Mar 16, 2021 at 10:20 AM Flavio Castro Alves Filho <
> > > > > flavio.al...@gmail.com> wrote:
> > > > >
> > > > > > Hello Xiang,
> > > > > >
> > > > > > Em ter., 16 de mar. de 2021 às 14:01, Xiang Xiao
> > > > > > <xiaoxiang781...@gmail.com> escreveu:
> > > > > > >
> > > > > > > On Tu
> > > > > > > >
> > > > > > > This project use the modern C++ feature, so you must enable
> llvm
> > > > > > > ibc++(CONFIG_LIBCXX=y)
> > > > > >
> > > > > > I tried a new build, executing:
> > > > > >
> > > > > > $ make distclean
> > > > > > $ ./tools/configure.sh -l stm32f4discovery:testlibcxx
> > > > > > $ make
> > > > > >
> > > > > > I can see the library being downloaded from git, but it is not
> > > > compiling.
> > > > > >
> > > > > > In file included from
> > > > > > /home/ubuntu/nuttx_ws/nuttx/include/libcxx/random:1637,
> > > > > >                  from libcxx/src/random.cpp:16:
> > > > > > /home/ubuntu/nuttx_ws/nuttx/include/libcxx/cmath: At global
> scope:
> > > > > > /home/ubuntu/nuttx_ws/nuttx/include/libcxx/cmath:321:9: error:
> > > > > > '::signbit' has not been declared
> > > > > >   321 | using ::signbit;
> > > > > >       |         ^~~~~~~
> > > > > > /home/ubuntu/nuttx_ws/nuttx/include/libcxx/cmath:322:9: error:
> > > > > > '::fpclassify' has not been declared
> > > > > >   322 | using ::fpclassify;
> > > > > >       |         ^~~~~~~~~~
> > > > > > /home/ubuntu/nuttx_ws/nuttx/include/libcxx/cmath:326:9: error:
> > > > > > '::isnormal' has not been declared
> > > > > >   326 | using ::isnormal;
> > > > > >       |         ^~~~~~~~
> > > > > > /home/ubuntu/nuttx_ws/nuttx/include/libcxx/cmath:327:9: error:
> > > > > > '::isgreater' has not been declared
> > > > > >   327 | using ::isgreater;
> > > > > >
> > > > > > How should I solve this issue?
> > > > > >
> > > > >
> > > > > CONFIG_LIBM has to be disabled, since NuttX match library
> implementation
> > > > > lacks many standard defined functions which is required by the new
> libc++
> > > > > library.
> > > > >
> > > > >
> > > > > >
> > > > > > > >
> > > > > > > You need tell compiler stop to search the toolchain provided
> c++
> > > > library
> > > > > > > by -nostdinc++
> > > > > > >
> > > > > >
> > > > > > I believe it will solve my cmake issue.
> > > > > >
> > > > > > Best regards,
> > > > > >
> > > > > > Flavio
> > > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > 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
>
>
>
> --
> Flavio de Castro Alves Filho
>
> flavio.al...@gmail.com
> Twitter: http://twitter.com/#!/fraviofii
> LinkedIn profile: www.linkedin.com/in/flaviocastroalves
>

Reply via email to