Json file issue? Header Files and Constructors section of Classy Clash



Stephen,
I am not sure what is going on in regards to the vscode side of this course, but I started getting this debugging issue in the classy_clash section of the beginner c++ course.
I even opened downloaded the exact files for this section on github with the same debugging issue pointing to this json file.
Would you be able to help with this, and be able to explain what is going on?

Thanks,
Daniel Horn

I am also experiencing this issue. For whatever reason the character file cannot be found. Do we have to add the file to a make list of some kind? Kind of stumped here.

1 Like

That’s a good question Clinton. I did some digging on this issue, and the makefile was one of the potential culprits as well.
Unfortunately I’m not familiar enough with json or makefiles to know which one(s) to adjust in order to get the project to compile.
I am curious if it would be helpful/possible to add a few video lectures on the raylib setup for being able to compile a project. At least for myself it helps to know how/why things work then assuming they do and leaving them as magical black boxes( the .vscode and makefile in this case).

Hopefully we’ll be able to see resolution soon on this, and we may continue to make awesome programs :smiley:

Cheers,
Daniel Horn

So I was getting the same "undefined reference to ‘Character::Character()’ etc errors.

I had downloaded the files in the repo up to this commit and was able to Run and Debug it successfully from my DOWNLOADS folder. If I moved the files from the repo to my projects folder outside of my User folder, it would throw those same errors. It worked on my Desktop as well so the issue had to do with the compiler not being able to find the Character.h file unless the project was in my User folder.

I was able to narrow the issue down and run my project from my DESKTOP after I replaced my .vs_code/tasks.json with the file from the repo. It still wouldn’t run in my projects folder though.

So in order to fix the errors, I had to do the following:

  1. move my project to C:\Users[My Name]\Desktop
  2. replace the .vs_code/tasks.json with the file in the repo: .vscode/tasks.json · 6c831899f491a611785551c554f9264076c8cae5 · GameDev.tv / CPP Course / Classy Clash · GitLab

I hope this helps others until we get a better tasks.json file

1 Like





BillN,

That is an interesting observation. I am glad to hear you are able to get the programs to run at certain file path locations :+1: .

I followed your procedure to the letter and unfortunately I am getting mixed results. After redownloading the section 12 commit, and modifying the tasks.json file with the prescribed link neither the desktop nor the downloads locations resulted in the program running.
I also downloaded the last section commit, and modified the tasks.json file as before with mixed results. I ran the program two times in Downloads, and once on the desktop. The first download run worked, so I tried the desktop to prove that it was not a fluke. Desktop did not work, and after going back to the downloads location the downloads folder did not run. Therefore that one instance was a fluke based on my small data sample, and I am not sure why it worked that one time, as I proceeded consistency on all attempts. Back to the drawing board for me :sweat_smile: .

Do you think this has to do with the structure of the Makefile or the .json files for building the project? I would like to learn more about how to make these files as they seem critical for the rest of the C++ course. I recognize the complexity of these files from the perspective of a beginner, may be potentially trickier, but if handwaving is going to occur with the .vscode folder and makefile these aught to not result in brick walls. Otherwise it would help to have the first section (if not the first project) to dive step by step on setting up these files. I am not sure if my setup is broken, and I am just a outlier(does not seem to be the case as others in the cpp_fundamentals thread are having similar issues).
The concern I am seeing here is that this is supposed to be marketed as a beginner’s friendly course, and the for the C++ portion I agree with that whole heartedly. However the enigmatic nature of the magic vscode box and makefile needs to be explained further.

Stephen,
I would implore you to add video lectures showing how to setup these .json, and makefiles for the course as I believe learning the C++ fundamentals is covered, but touching on another language would not only be helpful, but for further projects using Raylib the student would have a grasp on how to successfully build these programs. I support the success of this course, and I am extremely impressed with how the course as a whole is built. Just this one little bug is causing a great deal of intimidation and despair.

Cheers,
Daniel Horn

I’m sorry to hear my solution didn’t work for you, Daniel. I can’t believe I got something to work at all myself.

I second having a lecture on how to setup these MakeFiles so we can correct them when something like this goes wrong. I feel like a fish out of water in regards to this aspect of the program.

Hello everyone,

In our efforts to work out issues with building and setup, we’ve updated the template project. I know that issues I’ve had with building projects myself have been solved by downloading it and overwriting the contents with your project folder.

Can you give it a try and let us know the result?
As a quick reference, I’ll post the Gitlab link here

4 Likes

Thank you Tuomo! Just confirming that downloading the new template files resolved this issue for me!

Just for clarification: this link to new project files is supposed to be used to over-write an existing project, or is in itself a viable base project? Are we intended to copy all of the contents of this new folder and paste them into our project

Tuomo,

The updated template files work very well! The classy clash program ran right off the bat, and multiple times :smiley: .Thank you Tuomo!

Clinton_Ray,

The files in the raylib template are to replace the existing files in your project folder. I downloaded the link Tuomo posted, extracted the folder, copied the contents, and then replaced the existing .vscode folder/workspace/makefile/gitignore files. After opening the project foler in VS code, opening the workspace, and running in debug mode I was pleased to see the knight character moving on the sacred lands.

Cheers all,
Daniel Horn

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

Hi Clinton,

The updated files can either be used for a new project or overwrite an existing one without affecting your code. For best experience, please copy all of the contents as changes were made to multiple files.

Privacy & Terms