Forum

Graphical Compiler/Debugger[Codeblocks compat]?

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Graphical Compiler/Debugger[Codeblocks compat]?

Postby Mexicouger » Fri Dec 17, 2010 2:09 am

Anyone know of a good, Modern Compiler that I can use to compile code that works with Codeblocks? I am using My cygwin now, But it seems I am limited to text based content only. I want to maybe try to make a little pong game for learning, but need a good compiler.

Thanks,
Mexicouger
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby revelator » Fri Dec 17, 2010 7:13 am

mingw is pretty much default with codeblocks but you can use a heap of other compilers with it including the free msvc one.

not sure exactly what you mean by text based only ? could you elaborate.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby Mexicouger » Fri Dec 17, 2010 1:38 pm

reckless wrote:mingw is pretty much default with codeblocks but you can use a heap of other compilers with it including the free msvc one.

not sure exactly what you mean by text based only ? could you elaborate.


I am not sure whether I am right or not. But I just wondered if Cygwin was able to be coded in order to be able to draw an image to the screen. Or what about creating a simple game like pong? How would cygwin handle it in the little cmd box?
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby Spirit » Fri Dec 17, 2010 2:01 pm

A compiler is a compiler. You can create anything with it. What you are looking for are either tutorials how to write graphical things from scratch or a framework/libraries that offer you an easier API. This has nothing to do with cygwin. cygwin is not a compiler.

First of all, decide what language you want to use. Then google around and find tutorials or guides on those. Maybe you can find some that already use things like OpenGL or SDL.


edit: cygwin is a software suite that includes some compilers. As I said, you can do anything with those.
Improve Quaddicted, send me a pull request: https://github.com/SpiritQuaddicted/Quaddicted-reviews
Spirit
 
Posts: 1031
Joined: Sat Nov 20, 2004 9:00 pm

Postby Mexicouger » Fri Dec 17, 2010 2:43 pm

Spirit wrote:A compiler is a compiler. You can create anything with it. What you are looking for are either tutorials how to write graphical things from scratch or a framework/libraries that offer you an easier API. This has nothing to do with cygwin. cygwin is not a compiler.

First of all, decide what language you want to use. Then google around and find tutorials or guides on those. Maybe you can find some that already use things like OpenGL or SDL.


edit: cygwin is a software suite that includes some compilers. As I said, you can do anything with those.


I think I am getting mixed with Compilers and runners. Can I run graphical content using Cygwin? When I run, a little DOS box comes up, and I can do stuff in it. But maybe I have to have a graphical Runner or whatever it's called
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby revelator » Fri Dec 17, 2010 2:49 pm

for some examples try freeglut http://freeglut.sourceforge.net/index.php#download

from the cygwin console cd into the dir you extracted freeglut and write this ./configure --prefix=/cygdrive/c/glut --disable-shared and hit enter when its done write make and hit enter lastly write make install and hit enter.

look in your C drive for the glut folder. open it and change to share\demos there will be some executables in there. if you try to run them you will probably get an error about missing cygwin1.dll just copy that from the cygwin\bin dir to where those executables are and they should work now.

the problem with cygwin on windows is that cygwin is a posix layer emulating linux via the cygwin1.dll so anything you build on cygwin will depend on that dll. you can get around that restriction but its not for someone who aint totally accustomed to how the compiler works (its very very hard).

mingw is a windows compiler however and only relies on dll's you allready have on a windows box :) so anything you compile on mingw will pretty much run right out of the box (there are edge cases where you need a dll from mingw itself but the mingw dll's are fully windows compliant).
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby revelator » Fri Dec 17, 2010 2:50 pm

and yes you can very much do graphichal programs using either cygwin or mingw :)
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby Spike » Fri Dec 17, 2010 3:24 pm

cygwin's gcc generally supports a -mno-cygwin argument which basically gives you mingw but with a fully functional posix environment (required for many configure scripts).
otherwise, only cygwin users will be able to use your binaries.

try startx to get a gui in cygwin, assuming you installed those packages (you can directly start Xorg if you want more control, like better windows integration). Windowing systems within windowing systems are generally not a pretty sight, so you may be better off ignoring that cygwin comes with Xorg.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby revelator » Fri Dec 17, 2010 3:51 pm

was true with earlier cygwin unfortunatly that option was removed in later versions :(

now you need a crosscompiler for it to work sadly.

output from my cygwin.

gcc: The -mno-cygwin flag has been removed; use a mingw-targeted cross-compiler.
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby Spike » Fri Dec 17, 2010 5:38 pm

yup, which is why you install an older version of gcc, instead of the pointless one.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby revelator » Fri Dec 17, 2010 9:02 pm

thats offcourse an option allthough i dont quite get why they removed the option in the first place.

not sure if its pointless using later versions of gcc atleast not if you want to use openmp or need some of the added intrinsics in later versions. but i regress also were moving a bit offtopic i guess :).
User avatar
revelator
 
Posts: 2567
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Postby Baker » Fri Dec 17, 2010 9:35 pm

You are best off doing things like the Nehe tutorials or GLUT stuff or Googling for some open source game example to modify and going from there.

Or buying some C/C++ books off E-Bay or Half.com for $3.

Without some underlying experience, you wouldn't even be able to write a pong game. This would involve initializing an OpenGL window, building a program loop, rendering the gfx, uploading the textures to OpenGL, writing a pathway to read the files to even have the data to upload (RGBA, BGRA), reading keyboard or mouse input in the main loop and only then could you get to the game logic.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby Mexicouger » Fri Dec 17, 2010 11:12 pm

Baker wrote:You are best off doing things like the Nehe tutorials or GLUT stuff or Googling for some open source game example to modify and going from there.

Or buying some C/C++ books off E-Bay or Half.com for $3.

Without some underlying experience, you wouldn't even be able to write a pong game. This would involve initializing an OpenGL window, building a program loop, rendering the gfx, uploading the textures to OpenGL, writing a pathway to read the files to even have the data to upload (RGBA, BGRA), reading keyboard or mouse input in the main loop and only then could you get to the game logic.


Baker, I have a book now, And I read it everyday. I am not asking this blindlessly. I have gotten fairly familiar with the Quake engine, and wanted to try other stuff to gain some experience. And the thing is, I don't want to modify someones source engine, I want to follow a tutorial with steps and all. Then attempt something myself.

I guess I will try Mingw. It sounds decent, and I just want to make something I can visually interact with.
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Postby frag.machine » Sat Dec 18, 2010 5:38 pm

I guess what Mexicouger wants is to create a Win32 GUI application, with a window to draw stuff and things like that, correct ? If that's the case, I'd suggest you to check NeHe tutorials, where the first lesson is exactly a bare bones Win32 application that creates a window and bind it to OpenGL, besides a very basic message handler that can be extended according your needs. It's a very simple and well commented piece of code. And yeah, as everyone already said, you can build it with any win32 compiler out there.

Hope it helps.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Postby Mexicouger » Sun Dec 19, 2010 7:48 pm

frag.machine wrote:I guess what Mexicouger wants is to create a Win32 GUI application, with a window to draw stuff and things like that, correct ? If that's the case, I'd suggest you to check NeHe tutorials, where the first lesson is exactly a bare bones Win32 application that creates a window and bind it to OpenGL, besides a very basic message handler that can be extended according your needs. It's a very simple and well commented piece of code. And yeah, as everyone already said, you can build it with any win32 compiler out there.

Hope it helps.


Alright, I will check that out. Thanks for the help guys.
User avatar
Mexicouger
 
Posts: 514
Joined: Sat May 01, 2010 10:12 pm

Next

Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 1 guest