Problem with compiling

Hi,

I’m trying to compile the code, but it keeps giving me an error I’ve got no clue what to do with. :grimacing:
I’m very new to programming… so it might be very simple :stuck_out_tongue:


I hope someone can help, thanks in advance!

Wich OS do you use?

Mac OSX Big Sur 11.5.1

Sorry I don’t know Mac! Maybe @DanM can help you better than me. Did you do the updated Mac installation video?

Too bad… thanks for taking the time to respond!

1 Like

@Mapplec It looks like you do not have the correct vscode-template-main folder. I suggest you do the following steps:

  1. Delete that folder (save your hello.cpp somewhere else, or simply be prepared to do it over.

  2. Confirm that you have installed raylib. On Windows it will be at C:\raylib.

  3. Download the exact vscode-template-main specified in the lecture and install it someplace handy, such as under a folder where you will be doing your assignments on the fundamentals course.

  4. Don’t do anything inside of the vscode-template-main folder. It is a template – a folder that is a pattern for ones of your own.

  5. Make a copy of vscode-template-main. You can copy and paste the folder itself, and it will be a second one. Change the second one to have a name that goes with the assignment you are doing. Something like hello-project. I will assume that.

  6. Now right click on the `hello-project’ folder in File Explorer. Choose “Open with Code”

  7. Then put your hello.cpp (made new or copied from somewhere) into that folder.
    8, You should see something like this (but with your code).
    S1E2-2021-08-0938-hello-project

I see in your code that you are attempting to use Cocoa and Clang. As a beginner, you should not deviate from what the instructors provide. Otherwise, no one can help you that also is prepared to support you as a beginner.

If you get this far, you should now be able to use VS Code Run or Terminal | Build … to make more progress. If not, come back here and we’ll see what you’ve got.

@Mapplec my apologies. I did not see your reply about Mac OS, and I gave you my example on Windows 10.

I believe my advice is still applicable, but remarks about File Explorer, the install of raylib, etc., need to be adapted to your situation.

Also, the PDF information about Mac OS is about raylib projects and I am uncertain that it applies to the “My First Program” example. I also don’t understand why you would have to rename hello.cpp to main.cpp to satisfy the Mac OS build requirements.

Did you do the Homebrew steps?

That is not an error and only a warning. It’s due to the way raylib has setup the makefile. There’s nothing wrong, @StephenUlibarri should probably point this out.

1 Like

Thanks for replying!

I did exactly what the video instructed and, I followed all the steps you advised and got the same result…
As for using Cocoa and Clang. I’ve got the slightest clue what those are :stuck_out_tongue: and I didn’t change anything inside the program… so I think.

Thanks for replying!

So you’re saying nothing is wrong and I should just go on with the course?

My impression is there is something wrong with your “template” and what VS Code does with it. I don’t have access to a Mac OS system that I could check. Sorry, having enough difficulty with the Windows flavor.

Yup.

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

Privacy & Terms