apps/examples/helloxx entry point name was mangled when built as an NSH builtin; plus some README updates
This commit is contained in:
parent
44fe713165
commit
8445a4cdcd
@ -553,3 +553,5 @@
|
|||||||
is not selected. Also, complete the empty Kconfig file (2013-5-7).
|
is not selected. Also, complete the empty Kconfig file (2013-5-7).
|
||||||
* apps/NxWidgets/Kconfig: Updated to match NxWidgets/Kconfig by
|
* apps/NxWidgets/Kconfig: Updated to match NxWidgets/Kconfig by
|
||||||
Ken Pettit (2013-5-11).
|
Ken Pettit (2013-5-11).
|
||||||
|
* apps/examples/helloxx: C++ name mangling was occurring when this
|
||||||
|
example is built as an NSH built-in application. (2013-5-16).
|
||||||
|
@ -59,13 +59,10 @@ CNTXTDIRS = pwm
|
|||||||
|
|
||||||
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||||
CNTXTDIRS += adc can cdcacm composite cxxtest dhcpd discover flash_test ftpd
|
CNTXTDIRS += adc can cdcacm composite cxxtest dhcpd discover flash_test ftpd
|
||||||
CNTXTDIRS += hello json keypadtestmodbus mtdpart nettest nxlines relays
|
CNTXTDIRS += hello helloxx json keypadtestmodbus mtdpart nettest nxlines relays
|
||||||
CNTXTDIRS += qencoder smart_test telnetd watchdog wgetjson
|
CNTXTDIRS += qencoder smart_test telnetd watchdog wgetjson
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_EXAMPLES_HELLOXX_BUILTIN),y)
|
|
||||||
CNTXTDIRS += helloxx
|
|
||||||
endif
|
|
||||||
ifeq ($(CONFIG_EXAMPLES_LCDRW_BUILTIN),y)
|
ifeq ($(CONFIG_EXAMPLES_LCDRW_BUILTIN),y)
|
||||||
CNTXTDIRS += lcdrw
|
CNTXTDIRS += lcdrw
|
||||||
endif
|
endif
|
||||||
|
@ -100,7 +100,7 @@ $(CXXOBJS): %$(OBJEXT): %.cxx
|
|||||||
$(call ARCHIVE, $(BIN), $(OBJS))
|
$(call ARCHIVE, $(BIN), $(OBJS))
|
||||||
@touch .built
|
@touch .built
|
||||||
|
|
||||||
ifeq ($(CONFIG_EXAMPLES_HELLOXX_BUILTIN),y)
|
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
||||||
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
|
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
|
||||||
|
|
||||||
|
@ -100,7 +100,7 @@ $(CXXOBJS): %$(OBJEXT): %.cxx
|
|||||||
$(call ARCHIVE, $(BIN), $(OBJS))
|
$(call ARCHIVE, $(BIN), $(OBJS))
|
||||||
@touch .built
|
@touch .built
|
||||||
|
|
||||||
ifeq ($(CONFIG_EXAMPLES_HELLOXX_BUILTIN),y)
|
ifeq ($(CONFIG_NSH_BUILTIN_APPS),y)
|
||||||
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
$(BUILTIN_REGISTRY)$(DELIM)$(APPNAME)_main.bdat: $(DEPCONFIG) Makefile
|
||||||
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
|
$(call REGISTER,$(APPNAME),$(PRIORITY),$(STACKSIZE),$(APPNAME)_main)
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//***************************************************************************
|
//***************************************************************************
|
||||||
// examples/helloxx/helloxx_main.cxx
|
// examples/helloxx/helloxx_main.cxx
|
||||||
//
|
//
|
||||||
// Copyright (C) 2009, 2011-2012 Gregory Nutt. All rights reserved.
|
// Copyright (C) 2009, 2011-2013 Gregory Nutt. All rights reserved.
|
||||||
// Author: Gregory Nutt <gnutt@nuttx.org>
|
// Author: Gregory Nutt <gnutt@nuttx.org>
|
||||||
//
|
//
|
||||||
// Redistribution and use in source and binary forms, with or without
|
// Redistribution and use in source and binary forms, with or without
|
||||||
@ -128,6 +128,8 @@ static CHelloWorld g_HelloWorld;
|
|||||||
* Name: helloxx_main
|
* Name: helloxx_main
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
int helloxx_main(int argc, char *argv[])
|
int helloxx_main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
// If C++ initialization for static constructors is supported, then do
|
// If C++ initialization for static constructors is supported, then do
|
||||||
@ -162,4 +164,4 @@ int helloxx_main(int argc, char *argv[])
|
|||||||
delete pHelloWorld;
|
delete pHelloWorld;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user