From c2fd94127d04899f91aa31d70c3c581330c90c38 Mon Sep 17 00:00:00 2001 From: patacongo Date: Fri, 2 Nov 2012 23:22:48 +0000 Subject: [PATCH] Create an STM32F4Discovery configuration for testing uClibc++ git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5300 42af7a65-404d-4744-a932-0658087f49c3 --- examples/cxxtest/cxxtest_main.cxx | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/examples/cxxtest/cxxtest_main.cxx b/examples/cxxtest/cxxtest_main.cxx index 70d54109f..9c2974826 100644 --- a/examples/cxxtest/cxxtest_main.cxx +++ b/examples/cxxtest/cxxtest_main.cxx @@ -203,21 +203,25 @@ static void test_exception(void) // Name: cxxtest_main //***************************************************************************/ -int cxxtest_main(int argc, char *argv[]) +extern "C" { - // If C++ initialization for static constructors is supported, then do - // that first + int cxxtest_main(int argc, char *argv[]) + { + // If C++ initialization for static constructors is supported, then do + // that first #ifdef CONFIG_HAVE_CXXINITIALIZE - up_cxxinitialize(); + up_cxxinitialize(); #endif - test_iostream(); - test_stl(); - test_rtti(); + test_iostream(); + test_stl(); + test_rtti(); #ifdef CONFIG_UCLIBCXX_EXCEPTION - test_exception(); + test_exception(); #endif - return 0; + return 0; + } } +