0

I want to set up SDL_Image, SDL_Mixer and SDL_TTF, but it doesn't seem to work. I'm following Lazy Foo's SDL tutorial and tried setting it up like he says, but it just doesn't work. I put all the include files into include folder, and all the lib files into the lib folder. What I found is that there were x86 and x64 folders in the lib folder. When I tried x64 (because I have a 64-bit system)it all worked fine, CodeBlocks even told me suggestions (like when I wrote "img" it showed up a suggestion "IMG_Load", but when I come to compiling my code, this happens: http://puu.sh/3Eqa5.png. When I try with the x86 version, it doesn't work because some SDL.exe error pops up.

I really don't know what the problem is! Can anyone help?

genpfault
  • 51,148
  • 11
  • 85
  • 139
  • Do you have dll. files? –  Jul 16 '13 at 18:38
  • Yup. The mixer, image, ttf and original sdl .dll files are in SysWOW, my project and the folder with my .exe. Little update: I tried with the x86 folder, and it get the same error as x64. No sdl.exe error anymore. –  Jul 16 '13 at 18:40

1 Answers1

0

First download library from Link1 | Link2 and unzip it. After that create New Folder named SDL in c:/ and make two new folder inside SDL folder rename first as inclued and second as lib.

enter image description here

Copy the all file from the include folder of unzip file and paste to the folder include "C:\SDL\include" which you have created in c directories again copy all file from the lib folder of unzip file of step 1 and paste to the folder lib "C:\SDL\lib" which you have created in c directories also copy the SDL.dll file from the bin folder of unzip file and paste it inside C:\Windows\SysWOW64 and on C:\WINDOWS\SYSTEM32 folder (The problem with this method is if you have multiple SDL apps that use different versions of SDL, you'll have version conflicts.) enter image description here

Open the code block you will see window and click on create new SDL project, give project title name ,give path to save project and write project file name will create by default from project title name. After that click next. enter image description here

enter image description here

enter image description here

enter image description here

I hope, in this way you can solve your errors.

nKandel
  • 2,543
  • 1
  • 29
  • 47
  • Thanks, but that wasn't the whole problem ;) It turns out the version of SDL_Image was a bit buggy and didn't want to compile normally. Thanks anyway. –  Dec 17 '13 at 19:43