Grrr.... SDL Linking Problem

This is a discussion on Grrr.... SDL Linking Problem within the Game Programming forums, part of the General Programming Boards category; I just recently un-installed Dev C++ and installed Visual Studio 2005 Beta 2, and I installed SDL 1.2.8 for it. ...

  1. #1
    C++/Graphics Artist
    Join Date
    Aug 2005
    Location
    USA
    Posts
    10

    Grrr.... SDL Linking Problem

    I just recently un-installed Dev C++ and installed Visual Studio 2005 Beta 2, and I installed SDL 1.2.8 for it. I was testing to see if I had set up SDL for Visual Studio correctly, when it gives me these Linking problems.

    ------ Build started: Project: 2ndTest, Configuration: Debug Win32 ------
    Compiling...
    main.cpp
    Linking...
    main.obj : error LNK2019: unresolved external symbol __RTC_CheckEsp referenced in function _SDL_main
    main.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
    main.obj : error LNK2001: unresolved external symbol __RTC_InitBase
    LINK : error LNK2001: unresolved external symbol _mainCRTStartup
    Debug\2ndTest.exe : fatal error LNK1120: 4 unresolved externals
    Build log was saved at "file://c:\LIB_SDL\SDL_Test\SDL_Test\2ndTest\Debug\BuildLo g.htm"
    2ndTest - 5 error(s), 0 warning(s)
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

    Compiling works, but Linking for some reason doesnt. I have linked "SDL.lib" and "SDLmain.lib" to my project, and to avoid a warning I activated "/NODEFAULTLIB".

    Well, any ideas?
    .//website | .//anime | .//design
    - Project Crimson Blade - Text-based MMORPG. Powered by MySQL and PHP.
    - Web Blog: http://rylem.blogspot.com
    -----------------
    Primary OS: Windows 2000 Professional SP4
    Secondary OS: Ubuntu Linux 5.4 (Will be Fedora Project Core 4)
    Purpose: Multi-purpose programmer, artist, and designer.

  2. #2
    Registered User The Dog's Avatar
    Join Date
    May 2002
    Location
    Cape Town
    Posts
    788
    Check the code-generation settings.
    If I remember correctly, it should be either
    Multithreaded DLL or
    Multithreaded Debug DLL

  3. #3
    C++/Graphics Artist
    Join Date
    Aug 2005
    Location
    USA
    Posts
    10
    Theres 4 different kinds of DLLs listed there:

    Multi-threaded(/MT)
    Multi-threaded Debug(/MTd)
    Multi-threaded DLL(/MD)
    Multi-threaded Debug DLL(/MDd)

    The last one is the one that is already selected. Which one should I select?
    .//website | .//anime | .//design
    - Project Crimson Blade - Text-based MMORPG. Powered by MySQL and PHP.
    - Web Blog: http://rylem.blogspot.com
    -----------------
    Primary OS: Windows 2000 Professional SP4
    Secondary OS: Ubuntu Linux 5.4 (Will be Fedora Project Core 4)
    Purpose: Multi-purpose programmer, artist, and designer.

  4. #4
    ---
    Join Date
    May 2004
    Posts
    1,379
    try Multi-threaded DLL(/MD)

  5. #5
    C++/Graphics Artist
    Join Date
    Aug 2005
    Location
    USA
    Posts
    10
    Quote Originally Posted by sand_man
    try Multi-threaded DLL(/MD)
    Same result. On my first test I had no errors but 1 warning saying that the SDL library file I linked, conflicted with the default lib and that to get rid of the warning, activate "/NODEFAULTLIB". But maybe I shouldn't have done that?
    .//website | .//anime | .//design
    - Project Crimson Blade - Text-based MMORPG. Powered by MySQL and PHP.
    - Web Blog: http://rylem.blogspot.com
    -----------------
    Primary OS: Windows 2000 Professional SP4
    Secondary OS: Ubuntu Linux 5.4 (Will be Fedora Project Core 4)
    Purpose: Multi-purpose programmer, artist, and designer.

  6. #6
    C++/Graphics Artist
    Join Date
    Aug 2005
    Location
    USA
    Posts
    10
    Ok well, I managed to fix the problem. If anyone has a similiar problem and cant figure it out, PM me and I'll tell you how.
    .//website | .//anime | .//design
    - Project Crimson Blade - Text-based MMORPG. Powered by MySQL and PHP.
    - Web Blog: http://rylem.blogspot.com
    -----------------
    Primary OS: Windows 2000 Professional SP4
    Secondary OS: Ubuntu Linux 5.4 (Will be Fedora Project Core 4)
    Purpose: Multi-purpose programmer, artist, and designer.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with linking files
    By slippy in forum C Programming
    Replies: 2
    Last Post: 11-23-2007, 11:35 PM
  2. Problem with SDL
    By Mirchiss in forum Game Programming
    Replies: 1
    Last Post: 07-16-2006, 02:03 PM
  3. Linking problem
    By Magos in forum C++ Programming
    Replies: 4
    Last Post: 09-03-2004, 04:21 PM
  4. Long file linking problem
    By hypertension in forum C Programming
    Replies: 3
    Last Post: 10-15-2002, 10:55 PM
  5. Linking problem...
    By BrianK in forum C++ Programming
    Replies: 2
    Last Post: 10-08-2002, 05:13 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21