Thread: Classic Linking SDL in VC Problem

  1. #1
    Registered User IdioticCreation's Avatar
    Join Date
    Nov 2006
    Location
    Lurking about
    Posts
    229

    Classic Linking SDL in VC Problem

    I'm having this problem
    http://cboard.cprogramming.com/archi...p/t-83909.html

    But that person didn't explain how the got past the:
    LNK1561: entry point must be defined
    error.

    I tried the stuff that people suggested in there, but to no avail.

  2. #2
    Chinese pâté foxman's Avatar
    Join Date
    Jul 2007
    Location
    Canada
    Posts
    404
    Normally, if you want to work with SDL with Visual Studio (be 6.0 or 2005), you have to:

    • Create a "Win32 application" empty project
    • Add the SDL.lib and SDLMain.lib library to your project
    • Set the runtime library as "Multithreaded DLL"

    You also need the SDL.dll file to be in your project directory or in windows/system32/, but this wouldn't cause any linking error, only runtime error.

    And then, well, you start working with this
    Code:
    #include <SDL.h>
    
    int main(int argc, char *argv[])
    {
        return 0;
    }
    And it should work just fine.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. File Linking Problem
    By Yin in forum C++ Programming
    Replies: 63
    Last Post: 03-11-2002, 08:26 PM
  2. directX linking problem
    By Anders Sundman in forum Game Programming
    Replies: 2
    Last Post: 01-16-2002, 02:08 PM
  3. Hve a problem linking
    By cooleeze in forum C++ Programming
    Replies: 7
    Last Post: 11-23-2001, 02:43 PM
  4. problem with output
    By Garfield in forum C Programming
    Replies: 2
    Last Post: 11-18-2001, 08:34 PM
  5. Classic problem doesn't accept direction
    By cheesehead in forum C++ Programming
    Replies: 5
    Last Post: 11-13-2001, 06:32 PM