Compiling SDL for Windows (CodeBlocks) [Need Help]

I am receiving the following errors when trying to compile.

||=== Build: Release (SDL) in Cataclysm (compiler: GNU GCC Compiler) ===|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_SetRenderDrawColor'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_RenderFillRect’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_DestroyTexture'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_DestroyTexture’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_FreeSurface'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_DestroyTexture’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_SetRenderDrawColor'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_RenderDrawPoint’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_SetRenderTarget'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_SetRenderDrawColor’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_RenderFillRect'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_SetRenderDrawColor’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_RenderFillRect'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_RenderClear’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_QueryTexture'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_RenderCopyEx’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_GetError'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_CreateRGBSurface’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_FreeSurface'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_GetError’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_FreeSurface'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_CreateTexture’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_FreeSurface'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_FreeSurface’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_DestroyTexture'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_DestroyTexture’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_DestroyTexture'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_DestroyTexture’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_DestroyTexture'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| more undefined references toSDL_DestroyTexture’ follow|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to IMG_Load'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_UpperBlit’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_GetError'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_UpperBlit’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_GetError'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_UpperBlit’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_GetError'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_DestroyTexture’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_DestroyTexture'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_DestroyTexture’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_DestroyTexture'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_FreeSurface’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_UpperBlit'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_CreateTextureFromSurface’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_UpperBlit'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_GetError’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_CreateTextureFromSurface'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_UpperBlit’|
obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to SDL_GetError'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference toSDL_CreateTextureFromSurface’|
||More errors follow but not being shown.|
||Edit the max errors limit in compiler options…|
||=== Build failed: 50 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

I have added the bundled libraries for CodeBlocks found here: http://dev.narc.ro/cataclysm/cdda-win64-codeblocks.7z to my Cataclysm source folder.

It seems that the program is not recognizing the SDL libraries but I don’t know why.

Please help me, thank you!

I am experiencing the same issue.

I can’t quite recall, but you might have to link SDL to your toolchain in codeblocks.

It’s about the same effort required to set up a dualboot with linux for the sole purpose of cross compiling back to windows.

You probably have wrongly mixed 32 and 64 bit versions of libraries/compiler.