Skip to main content
Associate III
October 22, 2024
Solved

error when compiling with makefile

  • October 22, 2024
  • 3 replies
  • 1910 views

Hi everyone,

I am developing a new project with SMT32H7 MCU series, in which I have added the ITTIA DB middleware.

I’m encountering an issue while trying to compile my project using a Makefile. The Makefile was auto-generated, and the error I get during compilation is:

make: *** No rule to make target `build/oslib.cpp', needed by `build/M0045-8000_TheHeecapDevice.elf'. Stop.
make: *** Waiting for unfinished jobs....

The oslib.cpp file is present in my project directory, but it seems like the Makefile isn’t properly handling the .cpp file. Therefore, I am assuming that there is a problem with the makefile, since it cannot find/build cpp files.

What do I have to change in order to compile my project?

Here is the makefile attached.

 

This topic has been closed for replies.
Best answer by Pavel A.

The makefile lacks definitions for .cpp sources. The cpp files are not added to OBJECTS, and no definition for the  c++ (g++) compiler, and vpath statement is missing for .cpp. 

3 replies

Pavel A.
Pavel A.Best answer
October 22, 2024

The makefile lacks definitions for .cpp sources. The cpp files are not added to OBJECTS, and no definition for the  c++ (g++) compiler, and vpath statement is missing for .cpp. 

Associate III
October 25, 2024

Thank you!

Pavel A.
October 25, 2024

OBJECTS += ...