cancel
Showing results for 
Search instead for 
Did you mean: 

CubeIDE: Imported Eclipse 'C' Project incorrectly defines __cplusplus

Andrew Neil
Evangelist III

STM32 CubeIDE v1.5.1; Build: 9029_20201210_1234 (UTC)

The same Eclipse Project as:

https://community.st.com/s/question/0D53W00000Y2lIsSAJ/cant-usecreate-debug-config-for-oss7-stack

It is a 'C' Project, but the CubeIDE defines __cplusplus:

0693W000007ZDYEQA4.png 

Which, as you can see, messes-up the codes checks to see if C++ is being used!

If I manually delete that definition, all is fine.

The problem does not happen when opening the project in a "normal" Eclipse Neon 3.

So why is CubeIDE adding this?

33 REPLIES 33

I'm sorry to report that the "little stunt" to expose the MCU listing in IDE v1.7.0 no longer works. So, right now I cannot debug my project.

Can we please revisit this ASAP? Thanks!

When you say, "no longer" - does that mean it was previously working for you?

Las time I tried on v1.7.0 (probably a month or so ago), it was still working.

Have you recently done an update? Are you sure you're still on 1.7.0?

Ohhh I'm on 1.8.0!

0693W00000KbJugQAF.png0693W00000KbJuqQAF.png0693W00000KbJv0QAF.png0693W00000KbJv5QAF.png 

Any ideas?

"Any ideas?"

I think we'll have to as @mattias norlander​ ...

If you have a 1.7.0 project to which the "little stunt" has been applied, does that then work when opened in 1.8.0 ?

Yes, I can debug my 1.7.0 Makefile project just fine.

Just to be clear: That's a project created in 1.7.0, and then opened in 1.8.0 ?

Yes, I had created this Makefile project in 1.7.0, and it still works in 1.8.0. Appreciate the help!

I finally got things working by deleting:

  • .settings/*
  • *.project
  • *.cproject

So, I think the problem lies in there somewhere.

Hmm ... the .cproject and .project are the Project - so does that mean you had to re-create the Project from scratch?

Yes, I had to re-create the projects from scratch. I seem to be posting half-answers, haha sorry about that.

I thought it had been a workspace issue because I had deleted and re-created the project several times to no avail. I'm thinking maybe the project files aren't being cleared/deleted when they're deleted from the IDE project tree?