KaBOOM
KaBOOM

Reputation: 11

Visual Studio 2013 external symbol errors with SDL 2.0

So all I'm trying to do is move from a different IDE to Microsoft Visual Studio 2013. I've done a lot of research to try to fix it but I've tried it all. Here's the code that I'm trying to get working so that everything else can work as well:

#include <SDL.h>

int main(int argc, char* args[])
{
    SDL_Init(SDL_INIT_VIDEO);

    // game code eventually goes here

    SDL_Quit();

    return 0;
}

Here's the errors that I get when I try to run "Local Windows Debugger"

1>------ Build started: Project: SDLGame, Configuration: Debug Win32 ------
1>  Source.cpp
1>Source.obj : error LNK2019: unresolved external symbol __RTC_CheckEsp referenced in function _SDL_main
1>Source.obj : error LNK2001: unresolved external symbol __RTC_InitBase
1>Source.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
1>LINK : error LNK2001: unresolved external symbol _mainCRTStartup
1>C:\Users\Austin\Documents\Visual Studio 2013\Projects\SDLGame\Debug\SDLGame.exe : fatal error LNK1120: 4 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Here are some pictures of what I've changed to try to fix my issues. If you go here, you can see 4 pictures. I don't have enough reputation to include them into a hyperlink or whatever. imgur.com/f52YKld,f82dIbc,kUIad56,1DqpiJP#0

I even tried using x64 libraries just in case and it still didn't work.

Upvotes: 1

Views: 456

Answers (2)

KaBOOM
KaBOOM

Reputation: 11

Alright so I already followed the tutorial regarding correctly configuring SDL in Visual Studio BEFORE I posted this. However I've fixed my problem by installing VS Express with window desktop instead of the community one. Isn't REALLY an answer but it worked for me.

Upvotes: 0

TPS
TPS

Reputation: 2137

please see the following tutorial regarding how to correctly configure SDL in Visual Studio

http://zamma.co.uk/setup-sdl2-in-visual-studio/

It looks like you are half way there and that you are just missing the linker configuration for the libraries.

Upvotes: 1

Related Questions