How much c++
Moderator: Coders of Rage
Re: How much c++
You got it?
Re: How much c++
Dang same error.
Re: How much c++
indeed: Linking console executable: bin\Debug\blaaah.exe
mingw32-g++.exe: and: No such file or directory
mingw32-g++.exe: lmingw32: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
mingw32-g++.exe: and: No such file or directory
mingw32-g++.exe: lmingw32: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
When One learns to Love, One must bear the risk of Hatred.
Re: How much c++
You have it linked as -lmingw32 not lmingw32 (without the dash). I doubt it but its worth a shot.
Re: How much c++
Ok I'm going to run through the process step by step tell me if you forgot to do something.
Step 1: Download and extract SDL from the website make sure that you get the one for mingw (the one that ends in .tar.gz). (I advise putting it in your documents.
Step 2: Open Code::Blocks and click settings, compiler and debugger and under search directories click add and add the address to your recently extracted SDL include files. (Note make sure that you are under the compiler settings not the linker or resource compiler.
Step 3: Next click the linker tab and add the directory for the lib file.
Step 4: Next go over to the linker tab that is located next to search directories and copy and paste this in the other linker options box: -lmingw32 -lSDLmain -lSDL
Step 4: Close that window and go to the lib folder. In it you should find three lib files and a dll. Copy the dll and paste it in the project folder for your project.
Step 5: If you don't want the command prompt to appear go back to Code::Blocks and click project, properties, and under the tab build projects you should see a box that says console application or something like that. Click it and change it to gui application.
Step 6: Try the following code if it works a window will appear and wait for you to x out of it:
Hope this helps if not tell me.
EDIT: Beat me to it. What was wrong?
Step 1: Download and extract SDL from the website make sure that you get the one for mingw (the one that ends in .tar.gz). (I advise putting it in your documents.
Step 2: Open Code::Blocks and click settings, compiler and debugger and under search directories click add and add the address to your recently extracted SDL include files. (Note make sure that you are under the compiler settings not the linker or resource compiler.
Step 3: Next click the linker tab and add the directory for the lib file.
Step 4: Next go over to the linker tab that is located next to search directories and copy and paste this in the other linker options box: -lmingw32 -lSDLmain -lSDL
Step 4: Close that window and go to the lib folder. In it you should find three lib files and a dll. Copy the dll and paste it in the project folder for your project.
Step 5: If you don't want the command prompt to appear go back to Code::Blocks and click project, properties, and under the tab build projects you should see a box that says console application or something like that. Click it and change it to gui application.
Step 6: Try the following code if it works a window will appear and wait for you to x out of it:
Code: Select all
#include "SDL/SDL.h"
SDL_Surface *screen = NULL;
SDL_Event event;
int main(int argc,char *argv[])
{
if(SDL_Init(SDL_INIT_VIDEO) == -1)
return 1;
screen = SDL_SetVideoMode(640,480,32,SDL_SWSURFACE);
if(screen == NULL)
return 1;
bool quit = false;
while(!quit)
{
while(SDL_PollEvent(&event))
{
if(event.type == SDL_QUIT)
quit = true;
}
}
SDL_Quit();
return 0;
}
EDIT: Beat me to it. What was wrong?
Re: How much c++
Aparantely linker order was the problem. Gosh all that because of the order.
When One learns to Love, One must bear the risk of Hatred.
Re: How much c++
Well if you need any more help with SDL you know where to post.
Re: How much c++
Alright, thanks . I'm sure I'll need help eventually.
When One learns to Love, One must bear the risk of Hatred.
- programmerinprogress
- Chaos Rift Devotee
- Posts: 632
- Joined: Wed Oct 29, 2008 7:31 am
- Current Project: some crazy stuff, i'll tell soon :-)
- Favorite Gaming Platforms: PC
- Programming Language of Choice: C++!
- Location: The UK
- Contact:
Re: How much c++
Also the SDL DocWiki is an invaluable source of information http://www.libsdl.org/cgi/docwiki.cgiherby490 wrote:Well if you need any more help with SDL you know where to post.
If you don't quite know/forget how to implement something, or you forget which arguments to pass in a function, that's the place to go! I always find myself checking the syntax of functions like SDL_FillRect and SDL_MapRGB (well MUCH less freqently now, but you get what I mean)
If it's more of a design issue or you want to bounce some ideas off someone, I think we'd all be happy to oblige
---------------------------------------------------------------------------------------
I think I can program pretty well, it's my compiler that needs convincing!
---------------------------------------------------------------------------------------
And now a joke to lighten to mood :D
I wander what programming language anakin skywalker used to program C3-PO's AI back on tatooine? my guess is Jawa :P
I think I can program pretty well, it's my compiler that needs convincing!
---------------------------------------------------------------------------------------
And now a joke to lighten to mood :D
I wander what programming language anakin skywalker used to program C3-PO's AI back on tatooine? my guess is Jawa :P
Re: How much c++
programmerinprogress wrote:Also the SDL DocWiki is an invaluable source of information http://www.libsdl.org/cgi/docwiki.cgiherby490 wrote:Well if you need any more help with SDL you know where to post.
If you don't quite know/forget how to implement something, or you forget which arguments to pass in a function, that's the place to go! I always find myself checking the syntax of functions like SDL_FillRect and SDL_MapRGB (well MUCH less freqently now, but you get what I mean)
If it's more of a design issue or you want to bounce some ideas off someone, I think we'd all be happy to oblige
Thanks for the site, i'll check it out when i get home. I'll post back when I have something substantial. Might be a while lol.
When One learns to Love, One must bear the risk of Hatred.