PDA

View Full Version : Help required to run C++ code with .obj file



DeadCell
10-06-2009, 01:50 PM
Hey guys, I'm very new to OpenGL. I only recently started learning it. I have a problem which might be very simple for you to solve.

I need to run a file I compiled, with a .obj file which contains vertices of a particular shape.

On Linux I used:
./*filename* *objfilename.obj*

and it worked.

Right now I'm trying to do the same using CodeBlocks on Windows. The file has compiled fine, but how do i run it with the .obj file?. Because in the CodeBlocks IDE theres only the *build and run* option. I need the c++ file to manipulate and display the graphic, which I did with the above command on Linux but I dont know how to do it using an IDE.

Any help would be very appreciated.
Thankyou

ZbuffeR
10-06-2009, 02:04 PM
Huh this has absolutely nothing to do with OpenGL...
http://www.codejacked.com/a-beginners-guide-to-the-command-prompt/

marshats
10-06-2009, 07:00 PM
What you are trying to do is "pass a commandline argument" to codeblocks. Try adding your "*objfilename.obj*" (presumably without the *) via the CodeBlocks menu options ie

Project -> Set Program Arguments

DeadCell
10-07-2009, 02:23 PM
thanx marshats! its sorted. Thanks alot man :)