9 years, 6 months ago.  This question has been closed. Reason: Off Topic

USBSerial Export for kl25z

Hi,

I'm working on a project where I'm using the USBDevice library (in combination with USBSerial). Compiling online works fine. I prefer working offline using the gcc toolchain but when linking the USBSerial library I receive an error when trying to link USBSerial:

Error

undefined reference to `typeinfo for mbed::Stream'

Both USBDevice and USBSerial are being compiled locally through gcc, the mbed library as a whole is statically linked

GCC command line

-mcpu=cortex-m0plus -mthumb -Texternal\mbed\TARGET_KL25Z\TOOLCHAIN_GCC_ARM\MKL25Z4.ld -Wl,--gc-sections --specs=nano.specs -Wl,-Map=bin/Debug/kl25z.map,--cref -mcpu=cortex-m0plus -lmbed -lstdc++ -lsupc++ -lm -lc -lgcc -lnosys 

I noticed a similar question got asked earlier but never answered. Is this a bug or is my compiler acting up?

Regards

Even after updating to the latest mbed library and exporting the project as a whole I still have the same issue

posted by K. N. L. V. 06 May 2015

for future referece: -fno-rtti and -std=c++98 were missing from g++ cmd line

posted by K. N. L. V. 06 May 2015