1

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.

asked Nov 28, 2014 at 21:19
1

2 Answers 2

1

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.

answered Nov 29, 2014 at 13:38
Sign up to request clarification or add additional context in comments.

1 Comment

Quote: "Now expand the C/C++ tree and select the Code Generation section".
0

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.

answered Nov 29, 2014 at 20:54

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.