Trying to install SDL in netbeans...

closed account (N8RzwA7f)
Hello,

I've downloaded SDL here: the development minGW .
http://libsdl.org/download-2.0.php

I found this site to install:
www.netadelica.com/coding/sdl/install.html
I just renamed /msys/bin/sdl-config to: /msys/bin/sdl2-config
as well as renaming the SDL file in windows to SDL2.dll

I looked around online and I've read that I'm supposed to include
-lmingw32 -lSDLmain -lSDL to a project properties linker options ?
how should I do this ?

right now my error is while debugging a basically empty program :

#include <cstdlib>
#include "SDL/SDL.h"
using namespace std;

/*
*
*/
int main(int argc, char** argv) {

return 0;
}


error:

cd 'C:\Users\Melissa\Documents\NetBeansProjects\testdsl'
C:\MinGW\msys\1.0\bin\make.exe -f Makefile CONF=Debug
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk QMAKE= SUBPROJECTS= .build-conf
make.exe[1]: Entering directory `/c/Users/Melissa/Documents/NetBeansProjects/testdsl'
"/C/MinGW/msys/1.0/bin/make.exe" -f nbproject/Makefile-Debug.mk dist/Debug/MinGW-Windows/testdsl.exe
make.exe[2]: Entering directory `/c/Users/Melissa/Documents/NetBeansProjects/testdsl'
mkdir -p build/Debug/MinGW-Windows
rm -f "build/Debug/MinGW-Windows/main.o.d"
g++ -c -g -MMD -MP -MF "build/Debug/MinGW-Windows/main.o.d" -o build/Debug/MinGW-Windows/main.o main.cpp
mkdir -p dist/Debug/MinGW-Windows
g++ -o dist/Debug/MinGW-Windows/testdsl build/Debug/MinGW-Windows/main.o
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../libmingw32.a(main.o):(.text.startup+0xa7): undefined reference to `WinMain@16'
collect2.exe: error: ld returned 1 exit status
make.exe[2]: *** [dist/Debug/MinGW-Windows/testdsl.exe] Error 1
make.exe[2]: Leaving directory `/c/Users/Melissa/Documents/NetBeansProjects/testdsl'
make.exe[1]: *** [.build-conf] Error 2
make.exe[1]: Leaving directory `/c/Users/Melissa/Documents/NetBeansProjects/testdsl'
make.exe": *** [.build-impl] Error 2

BUILD FAILED (exit value 2, total time: 1s)


thanks for any help.
Last edited on
closed account (N8RzwA7f)
oke that worked thanks.
I was looking at that page earlier actually , but it all sounded very confusing and I was unsure how to continue without making things worse .
Topic archived. No new replies allowed.