Unable to link C++ code

We are having issues linking C++ files into our project. We are using Open AT with the SL8080BT on Developer Studios.

Starting with the hello_world sample, we added a file to src named foo.cpp, which contains the following:

#include "wm_types.h"
#include "adl_RspHandler.h"

int foo() {
	int i;
	for( i = 0; i < 20; ++i ) {
		adl_atSendResponse ( ADL_AT_UNS, "\r\nHello World from foo.cpp\r\n" );
	}

	return 0;
}

The only other addition we made was a call to this function at the end of main_task.

Here is the linker output:

14:57:55 **** Incremental Build of configuration Target_GCC_Debug for project Hallo ****
"C:\\SierraWireless\\DeveloperStudio\\plugins\\com.swi.cdt.build.win32_3.3.0.201501220937\\os\\win32\\make.exe" all 
'Building file: build.properties'
cmd /c copy ..\.settings\build.properties build.properties
        1 file(s) copied.
'Finished building: build.properties'
' '
'Building file: ../src/foo.cpp'
'Invoking: ARM EABI GCC C++ Compiler'
C:\SierraWireless\DeveloperStudio\tools\armeabigcc\4.7.4\bin\arm-none-eabi-g++.exe -D__OAT_API_VERSION__=652 -D__WIP_PLUGIN_VERSION__=556 -D__DEBUG_APP__ -DDS_TARGET_BB5 -DDS_DEBUG -D__arm -D__GNU_GCC__ -D__irq="" -I"C:\SierraWireless\Packages\openat.lib.os.model.6.52.0.201402271535\resources/ADL/itf" -I"C:\SierraWireless\Packages\openat.lib.os.model.6.52.0.201402271535\resources/ADL/basic" -I"C:\SierraWireless\Packages\openat.lib.plugin.model.WIP.5.56.0.201305170830\resources/WIP/itf" -I"C:\workspace\Hallo\inc" -O0 -Os -g -ggdb3 -Wall -c -fshort-enums -fdollars-in-identifiers -fno-strict-aliasing -fno-common -fomit-frame-pointer -mthumb-interwork -mthumb -mcpu=arm926ej-s -march=armv5te -mapcs -mno-apcs-stack-check -MMD -MP -MF"src/foo.d" -MT"src/foo.d" -o "src/foo.o" "../src/foo.cpp"
../src/foo.cpp: In function 'int foo()':
../src/foo.cpp:12:71: warning: deprecated conversion from string constant to 'ascii* {aka char*}' [-Wwrite-strings]
'Finished building: ../src/foo.cpp'
' '
'Building file: ../src/generated.c'
'Invoking: ARM EABI GCC C Compiler'
C:\SierraWireless\DeveloperStudio\tools\armeabigcc\4.7.4\bin\arm-none-eabi-gcc.exe -D__OAT_API_VERSION__=652 -D__WIP_PLUGIN_VERSION__=556 -D__DEBUG_APP__ -DDS_TARGET_BB5 -DDS_DEBUG -D__arm -D__GNU_GCC__ -D__irq="" -I"C:\SierraWireless\Packages\openat.lib.os.model.6.52.0.201402271535\resources/ADL/itf" -I"C:\SierraWireless\Packages\openat.lib.os.model.6.52.0.201402271535\resources/ADL/basic" -I"C:\SierraWireless\Packages\openat.lib.plugin.model.WIP.5.56.0.201305170830\resources/WIP/itf" -I"C:\workspace\Hallo\inc" -O0 -Os -ggdb3 -Wall -c -fshort-enums -fdollars-in-identifiers -fno-strict-aliasing -fno-common -fomit-frame-pointer -mthumb-interwork -mthumb -mcpu=arm926ej-s -march=armv5te -msoft-float -mapcs -mno-apcs-stack-check -MMD -MP -MF"src/generated.d" -MT"src/generated.d" -o "src/generated.o" "../src/generated.c"
'Finished building: ../src/generated.c'
' '
'Invoking: ARM EABI GCC C++ Linker'
C:\SierraWireless\DeveloperStudio\tools\armeabigcc\4.7.4\bin\arm-none-eabi-g++.exe -Wl,--script,gcc.lkopt "-Wl,-("  ./src/foo.o ./src/generated.o ./src/hello_world.o    -Os -O2 -fshort-enums -fdollars-in-identifiers -ggdb3 -u _siwiStubsImplementation -nostartfiles -fomit-frame-pointer -mthumb-interwork -mthumb -mcpu=arm926ej-s -march=armv5te -msoft-float -mfpu=fpa -mapcs -mno-apcs-stack-check -Wl,-nmagic -Wl,-Map,Hallo.map -laeabi -L"C:\SierraWireless\DeveloperStudio\plugins\com.swi.ebs.armeabigcc_3.3.0.201501281204\libs\oat" "C:\SierraWireless\Packages\openat.lib.os.model.6.52.0.201402271535\resources\ADL\RVDS_ADL.lib" "C:\SierraWireless\Packages\openat.lib.plugin.model.WIP.5.56.0.201305170830\resources\WIP\RVDS_WIP.lib" "C:\SierraWireless\Packages\openat.lib.plugin.model.WIP.5.56.0.201305170830\resources\WIP\RVDS_WIPSoftLib.lib" "-Wl,-)" -o"Hallo.axf"
./src/foo.o: In function `foo()':
C:\workspace\Hallo\Target_GCC_Debug/../src/foo.cpp:12: undefined reference to `adl_atSendResponse(unsigned short, char*)'
./src/hello_world.o: In function `main_task':
C:\workspace\Hallo\Target_GCC_Debug/../src/hello_world.c:100: undefined reference to `foo'
c:/sierrawireless/developerstudio/tools/armeabigcc/4.7.4/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/thumb\libg.a(lib_a-abort.o): In function `abort':
abort.c:(.text.abort+0xa): undefined reference to `_exit'
c:/sierrawireless/developerstudio/tools/armeabigcc/4.7.4/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/thumb\libg.a(lib_a-signalr.o): In function `_kill_r':
signalr.c:(.text._kill_r+0xe): undefined reference to `_kill'
c:/sierrawireless/developerstudio/tools/armeabigcc/4.7.4/bin/../lib/gcc/arm-none-eabi/4.7.4/../../../../arm-none-eabi/lib/thumb\libg.a(lib_a-signalr.o): In function `_getpid_r':
signalr.c:(.text._getpid_r+0x2): undefined reference to `_getpid'
collect2.exe: error: ld returned 1 exit status
make: *** [Hallo.axf] Error 1

14:57:56 Build Finished (took 1s.219ms)

Please have a look to this documentation section for more information:
Developer Studio User Guide > Build System > Open AT Features > Adding C++ code to an Open AT project