This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TMDSIDK437X: C++ example

Part Number: TMDSIDK437X
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

HOST OS: Ubuntu/64 14.07

Tools: CCS7, gcc-arm-none-eabi-4_9-2015q3 , processor_sdk_rtos_am437x_3_03_00_04, xdctools_3_50_01_12_core, uia_2_20_00_02

Using the example, bigtime_IDK_AM437X_CortexA

Compiles and executes on the IDK.

Issue:

1) Add a C++ class, see below files. Linker fails. This is due to g++ is not being used as the link, how to change this?

2) Add the following two lines of code to example.cpp

#include <vector>
std::vector<int>  _g;

Generates the following issues:

akefile:145: recipe for target 'bigtime_IDK_AM437X_CortexA.out' failed
/home/tcmichals/ti/bios_6_50_01_12/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/fpu/libc.a(lib_a-fstatr.o): In function `_fstat_r':
/home/xlibrary/trees/gnu/gnu-d01/src/linaro/gcc-arm-none-eabi-4_9-2015q3-20150921/src/newlib/newlib/libc/reent/fstatr.c:62: undefined reference to `_fstat'
/home/tcmichals/ti/bios_6_50_01_12/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/fpu/libc.a(lib_a-isattyr.o): In function `_isatty_r':
/home/xlibrary/trees/gnu/gnu-d01/src/linaro/gcc-arm-none-eabi-4_9-2015q3-20150921/src/newlib/newlib/libc/reent/isattyr.c:58: undefined reference to `_isatty'
/home/tcmichals/ti/bios_6_50_01_12/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/fpu/libc.a(lib_a-lseekr.o): In function `_lseek_r':
/home/xlibrary/trees/gnu/gnu-d01/src/linaro/gcc-arm-none-eabi-4_9-2015q3-20150921/src/newlib/newlib/libc/reent/lseekr.c:58: undefined reference to `_lseek'
/home/tcmichals/ti/bios_6_50_01_12/packages/gnu/targets/arm/libs/install-native/arm-none-eabi/lib/fpu/libc.a(lib_a-readr.o): In function `_read_r':
/home/xlibrary/trees/gnu/gnu-d01/src/linaro/gcc-arm-none-eabi-4_9-2015q3-20150921/src/newlib/newlib/libc/reent/readr.c:58: undefined reference to `_read'
collect2: error: ld returned 1 exit status
gmake[1]: *** [bigtime_IDK_AM437X_CortexA.out] Error 1
gmake: *** [all] Error 2
makefile:141: recipe for target 'all' failed

/*
 * example.h
 *
 *  Created on: Jun 8, 2017
 *      Author: tcmichals
 */

#ifndef EXAMPLE_H_
#define EXAMPLE_H_

class example
{
public:
    example();
    virtual ~example();
};

#endif /* EXAMPLE_H_ */

/*
 * example.cpp
 *
 *  Created on: Jun 8, 2017
 *      Author: tcmichals
 */

#include <example.h>
#include <array>
//#include <vector>

//std::vector<int>  _g;
example::example()
{
    // TODO Auto-generated constructor stub

}

example::~example()
{
    // TODO Auto-generated destructor stub
}