Skip to main content
Kmax18
Senior II
August 27, 2025
Solved

How to integrate and build the Adafruit Gamepad QT seesaw C++ library for the Nucleo-G071RB

  • August 27, 2025
  • 1 reply
  • 306 views

The goal is to test the Adafruit Gamepad QT with the Nucleo-G071RB board. This requires using the Adafruit seesaw C++ library of source files, which transmits analog joystick signals using the I2C protocol.

I used the code example I2C_TwoBoards_ComPolling (C-code) as a starting point an...

  • Added both the Adafruit seesaw and BusIO libraries (C++ code) to the project,
  • Updated the Project Include paths,
  • Added the library paths to the Project Source Locations (Figure 1), and
  • Renamed the main.c file to main.cpp.

Problem: the project does not built the Adafruit libraries, the compiler just ignores them.

What is the solution for this? How do I build the entire project, including the Adafruit libraries? Thank you!!!

Figure 1.

Kmax18_0-1756257230015.png

 

Best answer by Kmax18

The solution is to convert the STM32CubeIDE project from a C to a C++ project. In the Solution Explorer right-click the project and select "Convert to C++".  I wrongly assumed that renaming the main.c to main.cpp is sufficient, but it is not.

1 reply

Kmax18
Kmax18AuthorBest answer
Senior II
August 27, 2025

The solution is to convert the STM32CubeIDE project from a C to a C++ project. In the Solution Explorer right-click the project and select "Convert to C++".  I wrongly assumed that renaming the main.c to main.cpp is sufficient, but it is not.