04-27-2018, 11:22 PM
(This post was last modified: 04-28-2018, 11:29 AM by Brian Beuken.)
Ok so I just spent a while getting a Linux build version of InvadersStart up and running, there were several small issues, but overall is not the most horrible thing, its horrible, but not THE most horrible.
But, you do need to make sure you get several things set up, You can use the Raspberry Blink as a base, but I decided to make it harder and went for a linux console build
I then included all the InvaderStart files, which is easy enough
Take care to note the readme help file it displayed when you start the new project, most of the connection issues can be resolved with that. (its in the zip file here)
You have to go to Tools->options and find the cross platform options which will let you set up a connection.
Once done, you then need to go to your project properties and set up the directories in the VC++ Directories.. which for a raspberry are
/opt/vc/include /opt/vc/include/interface/vcos/pthreads /opt/vc/include/interface /opt/vc/include/interface/vmcs_host/linux
and the lib dir, /opt/vc/lib
There are options to change the output dir on the properties->General settings but best leave them as it tends to mess up debugging if you alter them, so your project will be sent to home/projects
In the C++ Proprocessor settings if you are porting any of the book code, you will need to define RASPBERRY and probably also a good idea to define another label so you know you are building on VSBUILD
There's a good reason to do this, since I can't really fiddle with output directory without breaking the debugger, which means you need to know if you are on the VSbuild when you are loading files as the path back to the Asset folder is different.
Now the real killer comes from the Linker settings, I had a devil of a time getting it to work, and even so it still reports a strange error after linking but says its successful? You need to add /opt/vc/lib again to the Additional directories, even though you specified the dir already.
In the input section enter the library names but use the most current ones so GLESv2_static etc.
And from memory thats basically how you set it up.
Things to note, I don't have warnings enabled on VisualGDB (yeah I should) but here they will be and there's a lot, you must choose to deal with them or disable them
So far I can only get the system to do single thread on target builds, so a lot of files means will take a lot longer to build the project.
Intellisense does not work, though there is a way to get that working which I will research soon.
I can't get the terminal output to redirect to GDB, so no text output, though I know it can be done.
There's probably a few other issues, but I have to get on with other things now, so if you want to play around, I've attached a dual project version of InvaderStart for you to experiment with.
But, you do need to make sure you get several things set up, You can use the Raspberry Blink as a base, but I decided to make it harder and went for a linux console build
I then included all the InvaderStart files, which is easy enough
Take care to note the readme help file it displayed when you start the new project, most of the connection issues can be resolved with that. (its in the zip file here)
You have to go to Tools->options and find the cross platform options which will let you set up a connection.
Once done, you then need to go to your project properties and set up the directories in the VC++ Directories.. which for a raspberry are
/opt/vc/include /opt/vc/include/interface/vcos/pthreads /opt/vc/include/interface /opt/vc/include/interface/vmcs_host/linux
and the lib dir, /opt/vc/lib
There are options to change the output dir on the properties->General settings but best leave them as it tends to mess up debugging if you alter them, so your project will be sent to home/projects
In the C++ Proprocessor settings if you are porting any of the book code, you will need to define RASPBERRY and probably also a good idea to define another label so you know you are building on VSBUILD
There's a good reason to do this, since I can't really fiddle with output directory without breaking the debugger, which means you need to know if you are on the VSbuild when you are loading files as the path back to the Asset folder is different.
Now the real killer comes from the Linker settings, I had a devil of a time getting it to work, and even so it still reports a strange error after linking but says its successful? You need to add /opt/vc/lib again to the Additional directories, even though you specified the dir already.
In the input section enter the library names but use the most current ones so GLESv2_static etc.
And from memory thats basically how you set it up.
Things to note, I don't have warnings enabled on VisualGDB (yeah I should) but here they will be and there's a lot, you must choose to deal with them or disable them
So far I can only get the system to do single thread on target builds, so a lot of files means will take a lot longer to build the project.
Intellisense does not work, though there is a way to get that working which I will research soon.
I can't get the terminal output to redirect to GDB, so no text output, though I know it can be done.
There's probably a few other issues, but I have to get on with other things now, so if you want to play around, I've attached a dual project version of InvaderStart for you to experiment with.
Brian Beuken
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's
Lecturer in Game Programming at Breda University of Applied Sciences.
Author of The Fundamentals of C/C++ Game Programming: Using Target-based Development on SBC's