[Help] Getting trouble when following Lazy Foo's SDL setting up

Hello guys. At first I'm sorry about my english. It's not good. So I hope you wont be mad with it.
Ok this my problem. Last night when I was trying follow Lazy Foo's tutorials of Setting up SDL in Dev C++
http://lazyfoo.net/SDL_tutorials/lesson01/windows/devcpp/
This is the code:
1
2
3
4
5
6
7
8
9
10
11
12
#include "SDL/SDL.h"

int main( int argc, char* args[] )
{
    //Start SDL
    SDL_Init( SDL_INIT_EVERYTHING );
    
    //Quit SDL
    SDL_Quit();
    
    return 0;    
}

I met a trouble when I was compiling at the final step. I dont know what is this problem. I used Dev C++ 5.11, SDL 1.2.15

http://i.imgur.com/8kjO3oK.png

C:\Program Files (x86)\Dev-Cpp\MinGW64\x86_64-w64-mingw32\bin\ld.exe cannot find -lSDL
C:\Game Project\collect2.exe [Error] ld returned 1 exit status
C:\Game Project\Makefile.win recipe for target 'SDL_tutorials.exe' failed

I realy greatful if you can help me fix that. From last night I was trying to find that from google but not useful.
Thanks you for watching.
Last edited on
Did you put SDL.dll to your project folder where the exe should be ? Just setting the include and libs is not enough. You need to set .dll that connects it with the SDL. you can but the dll to win32 or whatever the directory is(not sure, havent done it for a long time) or put it where your projects .exe will be. the DLL file should be somewhere in the SDL you downloaded, either in include or lib or some other folder.
Thank you for reply.
I very sure I followed extraclly what Lazy Foo's tutorials says, step by step. I put SDL.dll file to C:\Windows\SysWOW64 , and my project folder, too.
aah there might be the problem. I havent goten 64 bit working myself. Try 32bit and try SDL2, installation is the same but you get upgraded features.
"skipping incompatible .... libSDL.dll.a"
perhaps a 32/64 bits issue.
Okay thank you for your help. I also think this's 32/64 bit issue. I used window 10 64bit. I still finding a way to fix this. Thank you anyway.
You can build libSDL yourself if the appropriate version is not offered.
SDL2 is possibly a more appropriate choice these days.
Last edited on
Topic archived. No new replies allowed.