Page 1 of 1

How to compile .cpp files?

Posted: Fri Oct 09, 2020 10:22 pm
by Byter
I am using the make command to build the ROM and decided that I want to switch over to c++ so that I have classes. Therefore I switched the name of my file from Main.c to Main.cpp.

However if I try to compile the game now I get the following error:

make[1] *** No rule to make target 'C:/Users/Yanni/source/devkitPro/GBA_Spiel/GBA_Spiel/source/Main.c', needed by 'Main.o'. Stop.
make: *** [Makefile:118 build] Error 2

Is there a way to compile c++ code with devkitpro?

Re: How to compile .cpp files?

Posted: Sat Oct 10, 2020 1:42 am
by fincs
When you encounter this kind of error, it is suggested to run make clean prior to make, in order to clear out stale dependency tracking.

Re: How to compile .cpp files?

Posted: Sat Oct 10, 2020 10:04 am
by Byter
Thank you so much! I was afraid first that I couldn't use c++.

It works. Thanks