Topic : Cannot link a C++ program with Ride7

Forum : ARM

Original Post
Post Information Post
January 9, 2009 - 8:40pm
Guest

I have Primer2. I made a Ride7 project for STM32F103VET6 and added two files -> one .c file and one .cpp file. The compilation is fine, but I get the following link errors:
undefined reference to `operator delete(void*)'
undefined reference to `operator new[](unsigned int)'
undefined reference to `__cxa_end_cleanup'
undefined reference to `__gxx_personality_v0'
undefined reference to `vtable for __cxxabiv1::__si_class_type_info'
undefined reference to `vtable for __cxxabiv1::__class_type_info'

The first two errors I'm able to fix by overloading the "new" and "delete" operators. This is probably, because the heap is not initialized. The other errors seems to be, because I have virtual functions and class destructors. When I comment all virtual functions (no VTABLE) and comment all dctors, then the application links correctly.
Does somebody know what options should be set in Ride7 for the C++ compiler and linker to work correctly? Maybe I need to link additional libraries?
Also is there a tutorial how to use RTKit-ARM with C++?