Graphics in C/C++
I've learned programming in various languages (mainly C) but since I'm not very experienced I don't know how to make graphics in those language. The only language with which I can make graphics is Visual Basic, obviously because the graphic library is inside the language, but it's only for windows and it's not free, so I'd like to learn how to implement graphics in C or C++ language. Can somebody help me?
Buch, usually you'd turn to an outside library. Two common examples for C/C++ are Allegro and SDL.
How do I get one of those libraries, and how do I make it work?
The respective websites for those libraries will go into more details:
http://www.libsdl.org/
http://alleg.sourceforge.net/
Setting them up for development depends largely on your development environment. E.g. if you're working on Windows, the setup is very different if you're using MinGW versus Visual Studio. A bit of Googling should turn up tutorials on how to get started.
Also, if you want to make 3D graphics you should use OpenGL and OGRE (Rendering engine). Google both of them and you'll get tons of tutorials.
Speaking of 3D, there's also IrrLicht. :)
got game?
Talking about SDL, how should I put the files to make my compiler find them? I'm using MinGW
The anonymous of the previous post was me... I forgot to login before
I recommend OpenGL+SDL combination for game dev. If you want to learn SDL, check it out http://lazyfoo.net/SDL_tutorials/index.php
for OpenGL,
http://www.videotutorialsrock.com/
http://nehe.gamedev.net/
I got MinGW Developer Studio and I set it up with SDL like said in the SDL tutorial suggested by sharavasambuu, but, when I try to compile the trial source code, i get an error message that in English should sound:
'Unable to run the specified application. libgmp-10.dll not found. A new installation of the application might solve the problem.'
I've already installed twice both MinGW Developer Studio and MinGW, but the error is still there.
I've looked for the file libgmp-10.dll and it's inside the MinGW\bin folder. What could it be?
Problem solved! I found out that the library libgmp-10.dll (and some other libraries) had to be copied to another directory (the one with the cc1.exe file which showed the error message box) and now it works!