Page 1 of 1

Stuck on homework for lesson 15.

Posted: June 14th, 2017, 6:57 am
by Adzang
Hi everyone,
I am a complete noob when it comes to programming so if I ask some questions that seem really dumb you understand why :P.
Just wondering with homework for lesson 15 the box2d seems to have been changed to C and is no longer in C++ or am I doing something wrong because after I clone it and it says success I click on it and it goes to home screen as expected but there is no solution found. Been at this for 5 hours now trying to work out whats going wrong.
Any help would be greatly appreciated thanks in advance.

Re: Stuck on homework for lesson 15.

Posted: June 14th, 2017, 4:59 pm
by albinopapa
As far as the Box2D files, there is no solution. You only need to put the Box2D folder into your VC++ Directories \ Includes under your project settings, then #include <Box2D.h> at the top of your project.

Have you read the Building.txtfile?

He suggests putting the Box2D subfolder into your project, then you can import them into your project and then #include "Box2D.h". The other stuff about premake5, you'd have to ask someone else or figure it out on your own, I haven't dealt with premake only CMake and even then, I rely on step by step instructions.

Re: Stuck on homework for lesson 15.

Posted: June 14th, 2017, 8:15 pm
by Adzang
Ah ok cool tyvm. The video tutorial might need a little changing or comments added so noobs like me don't get stuck :P.

Re: Stuck on homework for lesson 15.

Posted: June 15th, 2017, 12:43 am
by chili
There is a solution file for visual studio, but you have to look for it. It involves exploring and thinking a little though ;)

Edit:
It seems they have changed the build steps. That's annoying; I might have to redo the homework solution video.

Here are the steps for Visual Studio 2017:
- Command line: premake5 vs2017
- Open the resulting Box2D.sln (should be in Build/vs2017)
- Set Testbed as the startup project
- In the Testbed debugging properties, set the Working Directory to ..\..\Testbed
- Press F5 to build and run the Testbed

Re: Stuck on homework for lesson 15.

Posted: June 15th, 2017, 6:10 am
by Adzang
Yeah just a little annoying but its only a small change although for the purpose of that home work kinda ruins what you were getting people to do. I did end up figuring it out that thanks to albinopapa pointing me in the right direction.

Re: Stuck on homework for lesson 15.

Posted: June 15th, 2017, 6:14 am
by albinopapa
I think when chili covered vcpkg, you were able to choose Box2D, that maybe another route.

Did you have to install Premake? Did you do the TestBed also?

Re: Stuck on homework for lesson 15.

Posted: June 15th, 2017, 6:53 am
by Adzang
Had to get Premake5 no install required tho. I just put it into the same directory that I had to unpack the build files from and ran command prompt cd'd that directory and typed premake5 vs2015.
The build folder and its contents as far as I could tell was all it had to do but just means I couldn't clone so I just went into build folder,vs2015 and opened Box2D from there.

Re: Stuck on homework for lesson 15.

Posted: April 27th, 2018, 10:54 pm
by Tsplinter

Re: Stuck on homework for lesson 15.

Posted: April 28th, 2018, 5:15 am
by chili
Another thing you can do is go back in time to a commit right around (maybe a little before) when the video was published. Then you'd be working with about the exact same code as I was when making the video. The power of Git.