How to compile .cpp files?

Post Reply
Byter
Posts: 2
Joined: Tue Oct 06, 2020 5:28 pm

How to compile .cpp files?

Post by Byter » Fri Oct 09, 2020 10:22 pm

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?

User avatar
fincs
( ͡° ͜ʖ ͡°)
Posts: 82
Joined: Mon Jul 12, 2010 9:45 pm
Location: Seville, Spain
Contact:

Re: How to compile .cpp files?

Post by fincs » Sat Oct 10, 2020 1:42 am

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.
Donate to devkitPro - help us stay alive!

Byter
Posts: 2
Joined: Tue Oct 06, 2020 5:28 pm

Re: How to compile .cpp files?

Post by Byter » Sat Oct 10, 2020 10:04 am

Thank you so much! I was afraid first that I couldn't use c++.

It works. Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest