Help with compiling with DevC++

  • asdf123
    18th Sep 2014 Member 0 Permalink

    Hello, I've been trying to compile with Devc++, but every time I try it gives me this message:

     

    315s:\rs\slouken\release\SDL\SDL-1.2.15\src\main\win32\SDL_win32_main.cundefined reference to `SDL_main'

     

    Which I don't get... All my other SDL programs work fine, I've got all the linkers... Please help!

    Thanks,

    ASDF123.

  • metrogdor22
    24th Sep 2014 Member 0 Permalink

    I was having this issue as well compiling on Visual Studio. I was able to solve it by following the FAQ guide on compiling Static.

  • jacob1
    24th Sep 2014 Developer 0 Permalink
    I suggest using the libraries linked to in the guides. The one has all the libs that should also work with devc++. The visual studio ones also work sometimes ...

    For devc++ i'm not sure though, maybe you set it up wrong. The order you link libraries might matter (I think you have to link -lSDLMain before -lSDL).
  • asdf123
    27th Sep 2014 Member 0 Permalink

    Wait... so which other libraries do i need again?

  • jacob1
    27th Sep 2014 Developer 0 Permalink
    @asdf123 (View Post)
    These: https://drive.google.com/uc?id=0B1XWtCTn2YPAZ3dqSU5CbjE4OXM&export=download

    + libbz2, libz, and libpthreads. Which can apparently be installed with "mingw-get install gcc g++ mingw32-libbz2 bzip2 mingw32-libz zlib mingw32-pthreads-w32" (assuming you have mingw-get)

    The wiki guide is here, you could try compiling using scons, i'm sure devc++ allows that.
    Edited once by jacob1. Last: 10th Jan 2017