Yes, include setting is done in the recently:
commit d32e9c38dfb0659a7f3c0cf586ba1584cd7eb3d6
Author: Xiang Xiao <xiaoxi...@xiaomi.com>
Date:   Sat Jul 11 18:37:40 2020 +0800

    boards: Move the C/C++ search path to the common place
    
    so all boards support uClibc++/libc++ automatically
    
    Signed-off-by: Xiang Xiao <xiaoxi...@xiaomi.com>
    Change-Id: Ibe6fafbec57f7acb26ea6188a3e9923ea82295c5
which is part of the work to make libc++/uCLibc++ available to all boards.

> -----Original Message-----
> From: Marc Rosen <ma...@zeitcontrol.de>
> Sent: Wednesday, August 12, 2020 2:46 PM
> To: dev@nuttx.apache.org
> Subject: Re: cpp cxx help - No thread API
> 
> I should look more through before starting to say stuff.
> 
> So most of the stuff I mentioned is moot because it was moved to a different 
> place that I was not aware of.
> 
> So Matt as Xiang mentioned the ARCHCXXFLAGS line should be enough. Importend 
> is the define of __NuttX__ because it enables the
> necessary options for libcpp to compile.
> 
> regards
> 
> Marc Rosen
> 
> ZeitControl Cardsystems GmbH
> Siedlerweg 39
> D-32429 Minden
> Tel.    ++49 (0)571 50 52 222
> Fax.    ++49 (0)571 50 52 299
> E-Mail  ma...@zeitcontrol.de
> 
> Am 12.08.2020 um 08:32 schrieb Marc Rosen:
> > Hi,
> >
> > i did a curiosity check on this.
> > No Make.defs for STM32 boards on master from some what yesterday
> > evening (my localtime) has any include definitions for c++.
> >
> > So to help Matt. the following is from my current config add this to
> > your Make.defs in your /nuttx/nuttx folder:
> >
> > ARCHINCLUDESXX += ${shell $(INCDIR) -s "$(CC)"
> > $(TOPDIR)$(DELIM)include} ARCHINCLUDESXX += ${shell $(INCDIR) -s "$(CC)"
> > $(TOPDIR)$(DELIM)include$(DELIM)cxx}
> > ARCHINCLUDESXX += ${shell $(INCDIR) -s "$(CC)"
> > $(TOPDIR)$(DELIM)include$(DELIM)libcxx}
> >
> > ifeq ($(CONFIG_LIBCXX),y)
> >   ARCHCXXFLAGS += -std=c++17 -D__NuttX__ -D_LIBCPP_BUILD_STATIC
> >
> >   ifneq ($(CONFIG_CXX_EXCEPTION),y)
> >     ARCHCXXFLAGS += -D_LIBCPP_NO_EXCEPTIONS
> >   endif
> >
> >   ifeq ($(CONFIG_LIBCXX_BUILD_LIBRARY),y)
> >     ARCHCXXFLAGS += -D_LIBCPP_BUILDING_LIBARAY
> >   endif
> >
> > endif
> >
> > regards
> >
> > Marc Rosen
> >
> > ZeitControl Cardsystems GmbH
> > Siedlerweg 39
> > D-32429 Minden
> > Tel.    ++49 (0)571 50 52 222
> > Fax.    ++49 (0)571 50 52 299
> > E-Mail  ma...@zeitcontrol.de
> >
> > Am 12.08.2020 um 08:07 schrieb Xiang Xiao:
> >> Do you have this in your boards/Make.defs:
> >> ARCHCXXFLAGS += -D__NuttX__ -nostdinc++ Since there are many complex
> >> setting to make C++ library work on NuttX, but this setting spread in 
> >> different Make.defs, I plan to enhance the experience in the
> next couple weeks(actually, all is done in our internal development branch):
> >> 1.Centralize the setting to arch/Toolchain.defs, so all boards will 
> >> support libc++/uClibc++ automatically.
> >> 2.Upgrade to the latest uClibc++(already upstream) and libc++ without
> >> the special NuttX hack 3.Modify Makefile to automatically download
> >> the package from the official release(uClibc++ already upstream)
> >> 4.Enable all deconfig related to uClibc++/libc++ in the daily build
> >> system
> >>
> >>> -----Original Message-----
> >>> From: Matt DeWall <mdew...@gmail.com>
> >>> Sent: Wednesday, August 12, 2020 10:53 AM
> >>> To: dev@nuttx.apache.org
> >>> Subject: cpp cxx help - No thread API
> >>>
> >>> Hi devs!  I'm getting started on NuttX and love the project.  Looking to 
> >>> port my cpp project to NuttX.
> >>>
> >>> I'm having trouble compiling the CPP version of the hello world
> >>> using the existing documentation.  I'm able to build nuttx just fine and 
> >>> flash my device using the C version of Hello World.
> >>>
> >>> The error during CXX building is "No thread API"
> >>>
> >>>
> >>> *Background:*
> >>>
> >>> I'm following the (latest?) directions here:
> >>>
> >>> https://github.com/apache/incubator-nuttx/
> >>>
> >>> I made my own docker image based on this Dockerfile which I understand 
> >>> nuttx is using for some part of ci/cid/testing:
> >>>
> >>> https://github.com/apache/incubator-nuttx-testing/blob/master/docker
> >>> /linux/Dockerfile
> >>>
> >>> Running the following commands:
> >>>
> >>>  git clone https://github.com/apache/incubator-nuttx.git nuttx  git
> >>> clone https://github.com/apache/incubator-nuttx-apps.git apps
> >>>
> >>> Then I configure for my own board (stm32f103rbt6) ./configure.sh
> >>> nucleo-f103rb/nsh
> >>>
> >>> After "make menuconfig" and configuring the C hello world app, I'm able 
> >>> to build and flash my board and run "hello" just fine.
> >>>
> >>> This leads me to believe my toolchain is good to go.
> >>>
> >>>
> >>> *Installing libcxx:*
> >>>
> >>> So moving on the c++ docs found here:
> >>> https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=139
> >>> 629545
> >>> but they may be outdated?
> >>>
> >>> Running:
> >>>
> >>> git clone https://bitbucket.org/acassis/libcxx
> >>> cd libcxx
> >>> ./install /nuttx/nuttx
> >>>
> >>> "Installing LLVM/libcxx in the NuttX source treeInstallation succeeded"
> >>>
> >>> I skipped the other two lines in that guide because they seem to clone a 
> >>> different and older nuttx clone from Alan's repo.
> >>>
> >>>
> >>> *Trying to implement c++:*
> >>>
> >>> Going over to make menuconfig and enabling the following options
> >>> (and whatever comes with them)
> >>>
> >>> Libary Routines->Have C++ Compiler
> >>>
> >>> Libary Routines->Build LLVM libc++
> >>>
> >>> Applications->Hello World C++ example
> >>>
> >>> When I go to build I get a "No thread API"...
> >>>
> >>> make[2]: Entering directory '/nuttx/apps/examples/helloxx'In file
> >>> included from /nuttx/nuttx/include/libcxx/cstdio:99,from
> >>> ./helloxx_main.cxx:42:/nuttx/nuttx/include/libcxx/__config:845:4: error:
> >>> #error "No thread API"845 | #  error "No thread API"
> >>>
> >>> I've only seen a 3 year old post where some person was using their own 
> >>> toolchain, so I'm not clear on how to proceed.
> >>>
> >>> I think I need to include some extra things in my Make.defs but I'm
> >>> usually working at a higher layer, I'm a medium-level linux person and 
> >>> have next to zero experience developing c/c++ apps on
> linux, but I"ve written plenty of apps on Windows.
> >>>
> >>> Really appreciate any help or insight you can provide, thanks!
> >>>
> >>> Matt
> >
> 


Reply via email to