Getting error with compiling

Tried to use the updated Github posted, but I am still getting errors on compile. I tried the method shown in the video and run task > Build debug
Anyone know what I am doing wrong?

No idea what I am doing, but since the program wanted that directory I just made it on the C drive and copied the files from Raylib into it and it seemed to work.

I’m honestly not sure where you’re getting TDM-GCC-64, but I do know that the gitlab projects were made with an old version of Raylib which has a different folder structure than it does now. It’s simple enough to update them if you’re downloading from a given lecture/commit.

You just need to copy the .vscode folder and makefile from our template project into the other one. And it’ll update that project for Raylib 4.X

OK, I went to the Github and downloaded everything again. Now I am getting this.


What that error is telling you is that there are multiple definitions of the main function within your project. The way this template project is setup, it collects all cpp files within your project and compiles them together. If you have two cpp files that have the main function defined, then the compiler doesn’t know which file contains the start of your program/game.

All you have to do then is either remove the other file from your project, delete the definition for main, or comment it out.

Got it. For some reason there was a main.cpp in that folder. Deleted that and all is good now.

Thank you for the assistance.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms