Jump to content
  • Advertisement
Sign in to follow this  
Bijo

Using MS Visual C/C++ command line compiler w/ SDL

This topic is 4095 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

I don't have time to look so long on the net and finding all these vague or unclear answers (been doing it for an hour or more). I'll put it down for you easy: I've downloaded Visual C++ only for the compiler which I use with my command prompt... not at all do I use the package for the IDE. Now, my problem is that typical one with the linker that I've seen a lot when searching for answers on the net: LNK1561 fatal error; entry point must be defined. I've set up things correctly as far as I know (copied DLL to system32 directory, etc., etc.), so I'll cut to the chase (but if you need more info, just ask and I'll give it to ya... here's what I do in the raw sense: cl -Ic:\sdl\include mymain.cpp cl: the compiler .exe -I: to specify the include path of SDL mymain.cpp: source file

Share this post


Link to post
Share on other sites
Advertisement
It looks like you're not linking with the sdl libs...the command line should be something along the lines of:

cl -I"path\to\sdl\include" mymain.cpp /link /libpath:"path\to\sdl\lib" sdl.lib sdlmain.lib

I'm not sure if that command is exactly right, but it should be close.

Edit: You might also need /SUBSYSTEM:WINDOWS after /link, not sure.

Share this post


Link to post
Share on other sites
Thanks for the reply. I'd actually tried that one out too, but it doesn't work either. Been hammering the thing too long, possible good-looking variations, so I switched back to MinGW/g++, but I get even more errors there, hah hah :)

Thanks still. I'll give it a shot later.

Share this post


Link to post
Share on other sites
Meh, there's something about IDEs I don't like, I don't know what it is. I just detest them, but maybe I should just forget about it and start using one. A simple text editor and a command-line compiler just feel a lot better.

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!