cancel
Showing results for 
Search instead for 
Did you mean: 

error when compiling with makefile

massimoperdigo
Associate III

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Pavel A.
Evangelist III

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. 

View solution in original post

3 REPLIES 3
Pavel A.
Evangelist III

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. 

Thank you!

OBJECTS += ...