Arc Synthesis tutorials help

Hello there I have started again trying to learn C++. I am trying to get the hang of graphics programming so have thrown away a lot of stuff I found which only mentions how to make very simple games which work through the console, which I've already previously done. I need something a bit better now, I need graphics, graphics turn me on!

So I started looking at the http://www.arcsynthesis.org/gltut/ series again and this time got as far as downloading the tutorials and the pre-make utility.

I even managed to get premake to compile the code into a codeblocks compatible format. But when I go into the code and run the framework.cpp. It fails to run with "You must select a "host" application to run a library". I have no idea how to solve this.

I'm not sure if this has something to do with the http://www.arcsynthesis.org/gltut/Building%20the%20Tutorials.html
page, as it gives only the very vaguest hints as to what to do with the downloads, and quite frankly, it doesnt tell you what to do with (whatever file it makes) when you premake the opengl library files.

Can anyone offer help (or a step by step list) of everything I need to do to be able to run the tutorials after I premake it (in codeblocks)

Thanks in advance!
No idea on the Code::Blocks side. You shouldn't really be running the framework, though.

From the top...
Premake doesn't compile the code as such. It's a cross-platform make utility based on Lua. It'll generate project files for whatever IDE you prefer.

You need to download premake and the unofficial OpenGL SDK. That's like a collection of GL-centric stuff - maths, mesh loaders etc. This should be in a gldsk directory, which you should put in the root directory of the tutorials.

Then, from that directory type premake4 <plat>, where plat is the IDE project type you want to build. For Code::Blocks, it'll be premake4 codeblocks. For a list of supported actions and any options, just type premake --help.

That should generate a project file for your IDE in each of the Tut* folders. You should be able to open the project for which ever tutorial you need. It'll pull in the framework code when and where it needs it.

For what it's worth, I followed these tutorials a different way. I didn't like a few things with the code structure so I wrote my own stuff as I went a long. I found that to be a much more enriching and engaging way of learning. Just mentioning as it's totally viable to follow the tutorials without running the sample code.

Hope this helps.
Doesnt really help but thanks anyway. I do get that premake is basically just converting the raw source code into a format codeblocks likes, and i ran premake on the opengl files.

My query is that opening the project and running the framework file (which that very page tells you is the main file you should run), generated that error. I just really need to know how to fix it so the code works.

I have a feeling its something to do with the opengl premaking bit, because yeah it premakes, but then I have no idea if im supposed to put it anywhere or tell codeblocks where it is...
CrazyCrinkle wrote:
which that very page tells you is the main file you should run

No, it doesn't.

It tells you that the framework.cpp, as well as other files in the framework directory, is shared amongst all of the tutorials. At no point does it tell you to do anything with it.

I think it might help if you read up on premake and why it's being used here. As I said early, all it does is make projects for your desired platform. In your case, Codeblocks. I've just generated the first tutorial for Xcode on Mac. Providing you have all of the relevant libraries (FreeGLUT et al.) installed then it works fine.
I kind of know what premake is doing, just in very simply terms, thats not the problem. The problem is how stupidly and needlessly complicated programming has become these days.

You cant just put a file in a directory, type "include ####" and it just works. No.

You have to convert sourcecode into an IDE-freindly format (because they're all read c++ in different ways), you have to compile OpenGL source code into a an ide freindly version that it can use. You also apparently have to have about 5 different versions of OpenGL (glew, gltut, freegl, glib and god knows what else) You then, presumably have to tell the IDE where this version is.

And you still have to reference the file in your code. I dont see a reason why it cant just all come ready to use...

But anyway, back on track. I have been told by the codeblocks people (who also state it is a problem with the code, not their program) to compile a workspace file which premake made in the opengl source code directory. I have done so.

This may have made some change, because now when I run the file in code blocks I get build log errors instead of general errors:

1
2
3
4
5
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lglloadD
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lglimgD
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lglutilD
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lglmeshD
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/ld.exe: cannot find -lfreeglutD


I believe these will be things the opengl code should have compiled into, so now im unsure if it worked correctly or not?? It only gave one warning, and continued to build all the way to the end.
Last edited on
Topic archived. No new replies allowed.