NetBeans Forums
| View previous topic :: View next topic |
| Author |
Message |
codeman22
Joined: 10 Dec 2011 Posts: 5
|
Posted: Mon Dec 12, 2011 10:21 pm Post subject: Beginner(again) - Trying to get SDL to work with Netbeans |
|
|
I recently solved my previous problem, and now I have a new one
I am trying to get the SDL library to work with Netbeans, but it is really hard to find a tutorial on this for some reason. I have downloaded the library and followed this instructions found here:
http://lazyfoo.net/SDL_tutorials/lesson01/windows/eclipse/index.php
(I tried using the eclipse tutorial method, since I figured it would be a similar method for Netbeans. I added the libraries MinGW32, SDLmain, and SDL in that order.
After using this code:
#include "SDL/SDL.h"
int main( int argc, char* args[] )
{
//Start
SDL SDL_Init( SDL_INIT_EVERYTHING );
//Quit SDL
SDL_Quit(); return 0;
}
I then tried to compile, and I got this error:
"/usr/bin/make" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make[1]: Entering directory `/c/Users/blah/HelloWorldSDL'
"/usr/bin/make" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/helloworldsdl.exe
make[2]: Entering directory `/c/Users/blah/HelloWorldSDL'
mkdir -p build/Debug/MinGW-Windows
rm -f build/Debug/MinGW-Windows/main.o.d
g++.exe -c -g -MMD -MP -MF build/Debug/MinGW-Windows/main.o.d -o build/Debug/MinGW-Windows/main.o main.cpp
main.cpp: In function 'int SDL_main(int, char**)':
main.cpp:13:5: error: 'SDL' was not declared in this scope
main.cpp:13:9: error: expected ';' before 'SDL_Init'
make[2]: Leaving directory `/c/Users/blah/HelloWorldSDL'
make[1]: Leaving directory `/c/Users/blah/HelloWorldSDL'
make[2]: *** [build/Debug/MinGW-Windows/main.o] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
BUILD FAILED (exit value 2, total time: 1s)
I'm really trying to figure out how to get this to work. Sorry if I seem a little stupid. I'm a noob. |
|
| Back to top |
|
 |
soldatov
Joined: 05 Nov 2009 Posts: 388
|
Posted: Thu Dec 15, 2011 8:50 am Post subject: Re: Beginner(again) - Trying to get SDL to work with Netbeans |
|
|
| codeman22 wrote: |
SDL SDL_Init( SDL_INIT_EVERYTHING );
|
valid line: SDL_Init( SDL_INIT_EVERYTHING ); |
|
| Back to top |
|
 |
codeman22
Joined: 10 Dec 2011 Posts: 5
|
Posted: Thu Dec 22, 2011 5:18 am Post subject: Re: Beginner(again) - Trying to get SDL to work with Netbeans |
|
|
| soldatov wrote: | | codeman22 wrote: |
SDL SDL_Init( SDL_INIT_EVERYTHING );
|
valid line: SDL_Init( SDL_INIT_EVERYTHING ); |
Thanks man! I figured this out after about 5 hours of screwing with various things. I'm stupid. I thought it was instantiating an SDL object or something. Bleh. Maybe if I wasn't just a dummy...
Lol. Merry Christmas forum! |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|