Skip to main content
FTava.1
Visitor II
Feb 14, 2020 11:42 AM UTC
Question

How can we get the IDE to build a C++ project?

Hi,

my team has the intention of using the STM32H745IIK6 in one of our products.

We acquired a STM32H745i-disco board for developing the firmware, which has to be in C++.

The problem is: we can't get a the IDE to build a C++ project, as it always seems to be expecting plain C (not recognizing C++ symbols).

Can you send us a trivial sample project, configured to build C++ source files?

Our schedules are tight and we should start making the first builds very soon.

Many thanks,

Filipe Tavares

This topic has been closed for replies.

4 replies

berendi
Principal
Feb 14, 2020 12:29 PM UTC

Source files with C++ code should have one of these extensions

.cc

.cpp

.cxx

.C

Cartu38 OpenDev
Graduate II
Feb 14, 2020 1:16 PM UTC

As addon to valuable previous comment be aware project target language can be set on project creation thru dedicated wizard or on any STM32CubeIDE project relying on project contextual menu of Project explorer view. Some "Convert to C++" or "Convert to C" feature is available to you accordingly.​

KnarfB
Super User
Feb 14, 2020 1:45 PM UTC

There was a recent discussion "How do I compile C++ on STM32CubeIDE?" in the forum. See my comments there. I dont know how to add a permanent link, so you have to use the search function, sorry.

hth

KnarfB

ICadi.1
Visitor II
Feb 14, 2020 1:54 PM UTC