Jump to content
  • Advertisement
Sign in to follow this  
Incogito

[SDL] Setup errors, VC++ .NET

This topic is 4559 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Althogh I'm not too new to programing, I'm just begining with graphics.. Anyway, I've been trying to install SDL on my copy of Visual Studio .NET, but keep getting the following problems, even after following the instructions from various sites: Linking... MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library SDLmain.lib(SDL_win32_main.obj) : error LNK2019: unresolved external symbol _SDL_main referenced in function _main Debug/Vacuus_2D.exe : fatal error LNK1120: 1 unresolved externals I've added the SDL lib/include directories to the VC list, changed to a Multi-Threaded DLL, and added the 2 required library files {SDL.lib, SDLmain.lib} So, does anyone have any idea whats going on here? I'ld figure it out myself - but, the little programming experience I have prohibits me from undetstanding those errors... Thanks

Share this post


Link to post
Share on other sites
Advertisement
Your main function has to be: int main(int argc, char* argv[]) SDL is very picky about this, and will give you that error when it can't find an exact match.

Share this post


Link to post
Share on other sites
In addition, to get rid of that linker warning (if the compiler doesn't automagically ignore it for you) is to add MSVCRT.LIB to the ignore list in Project Settings (Properties) > Linker > Input > Ignore Specific Library.

Or, since you're using MSVC, you can use a pragma command to do it -

#pragma comment (linker, "/NODEFAULTLIB:\"MSVCRT.LIB\"")

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!