S
soulfreshner
I'm using windows and compiling with MinGW.
After compiling and installing SDL successfully, I tried following
this tut (http://lazyfoo.net/SDL_tutorials/lesson03/windows/mingw/
index.php) to get SDL_image up and running. Trying to compile the code
gives me linker errors:
g++ -I/mingw//include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main -L/mingw//
lib -lmingw3 2 -lSDLmain -lSDL -lSDL_image -mwindows
sdl_blit_stuff.cpp -o test.exe
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
.text
+0x23): und efined reference to `IMG_Load'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
.text
+0x37): und efined reference to `SDL_DisplayFormat'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
.text
+0x45): und efined reference to `SDL_FreeSurface'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
.text
+0x7f): und efined reference to `SDL_UpperBlit'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
.text
+0xc6): und efined reference to `SDL_SetVideoMode'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
.text
+0xf1): und efined reference to `SDL_WM_SetCaption'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
.text
+0x239): un defined reference to `SDL_FreeSurface'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
.text
+0x2a4): un defined reference to `SDL_Flip'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
.text
+0x2c4): un defined reference to `SDL_PollEvent'
collect2: ld returned 1 exit status
make: *** [test] Error 1
It looks like I'm not linking something, but much googling still gave
me nothing. Any ideas?
-d-
After compiling and installing SDL successfully, I tried following
this tut (http://lazyfoo.net/SDL_tutorials/lesson03/windows/mingw/
index.php) to get SDL_image up and running. Trying to compile the code
gives me linker errors:
g++ -I/mingw//include/SDL -D_GNU_SOURCE=1 -Dmain=SDL_main -L/mingw//
lib -lmingw3 2 -lSDLmain -lSDL -lSDL_image -mwindows
sdl_blit_stuff.cpp -o test.exe
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
+0x23): und efined reference to `IMG_Load'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
+0x37): und efined reference to `SDL_DisplayFormat'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
+0x45): und efined reference to `SDL_FreeSurface'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
+0x7f): und efined reference to `SDL_UpperBlit'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
+0xc6): und efined reference to `SDL_SetVideoMode'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
+0xf1): und efined reference to `SDL_WM_SetCaption'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
+0x239): un defined reference to `SDL_FreeSurface'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
+0x2a4): un defined reference to `SDL_Flip'
C:/DOCUME~1/Derick/LOCALS~1/Temp/cc2Pbaaa.o:sdl_blit_stuff.cpp
+0x2c4): un defined reference to `SDL_PollEvent'
collect2: ld returned 1 exit status
make: *** [test] Error 1
It looks like I'm not linking something, but much googling still gave
me nothing. Any ideas?
-d-