‎2018-10-22 04:20 AM
Hello Mr./Ms.
I need to implement some libraries e.g. Arduino or other open source code.
So I tried to import in Atollic a C++ librarie but returns an error when I instance a class.
It's possible to do that or only C moddules are supported?
I generate code using CubeMx tool.
Thanks in advance
Best regards
‎2018-10-23 01:58 AM
‎2018-10-23 02:11 AM
I think you need to step back, and reconsider the design - rather than just randomly changing stuff here & there.
The errors you show are Linker errors - so you have got past the C/C++ language issues.
If you created the project as a 'C' project, then it probably has the 'C' startup & runtime support - not C++.
And remember that C++ has name-mangling ...
As I suggested earlier, it's probably best to start with a C++ project, and bring the 'C' bits in - rather than the other way around.
Have you read-up on the standard requirements for mixing C and C++ - "extern 'c'", etc ... ?
‎2018-10-23 04:33 AM
No I don't know standard requirements for mixing C and C++ - "extern 'c'", etc ... :downcast_face_with_sweat:
‎2018-10-23 04:40 AM
Well that's clearly something that you need to read-up on and understand first!
As noted, it's not specific to STM32 or ARM or GCC
May well be easiest to do that on a PC - away from the added complications of the embedded world ...
‎2018-11-05 09:30 AM
Hi @diego ambroggi​ ,
can you have a look at this thread:
https://forum.atollic.com/viewtopic.php?f=3&t=1522&p=3450&hilit=STM32CubeMX#p3450
I am not sure you did the File > New > Convert to a C/C+ Project step, and also migrating C compiler settings.
Best regards,
Cedric