Linker Errors with Code Blocks

Hey all,

I’m having some difficulty getting the game to compile in Code::Blocks for the Release (SDL) target. I renamed my existing WinDepend folder and copied the bundled libraries into the Cataclysm source directory, as instructed in COMPILING.md. I also replaced SDL_platform. I didn’t do any of the steps in the “Installing Tiles(SDL) libraries” section, as it seems like those files are all in the cdda-win64-codeblocks.7z file.

Unfortunately, the linking process fails when I go to build. From the build log:

||=== Build: Release (SDL) in Cataclysm (compiler: GNU GCC Compiler) ===| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to `SDL_RenderClear'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to `SDL_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 to `SDL_CreateRGBSurface'| 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 to `SDL_DestroyTexture'| 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 to `SDL_CreateTextureFromSurface'| 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 to `SDL_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 to `SDL_FreeSurface'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to `SDL_MapRGB'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to `SDL_SetColorKey'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to `SDL_SetSurfaceRLE'| 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 to `SDL_GetError'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to `SDL_MapRGBA'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to `SDL_FillRect'| 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 to `SDL_FreeSurface'| 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 to `SDL_RenderClear'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to `SDL_RenderSetClipRect'| obj\ReleaseSDL\src\cata_tiles.o:cata_tiles.cpp|| undefined reference to `SDL_RenderSetClipRect'| ||=== Build failed: 25 error(s), 0 warning(s) (2 minute(s), 30 second(s)) ===|

I’m using the GNU GCC compiler in Code::Blocks 13.12 in Windows 7 x64. Any ideas why this is failing?

When you say the libraries are in the blabla.7z file, do you mean they’re still archived in the file? The libraries have to be somewhere the build system expects them to be.