Compiling a SDL2 Program from the Command-Line w/ Visual C++

Hello, everyone! I tried to set up SDL2 with Visual Studio 2013 Express, but didn’t succeed. So, I’m trying to compile a SDL2 program from the command line. The file name is main.cpp. My command so far is

cl main.cpp /I C:\sdl2\include /link /SUBSYSTEM:WINDOWS

However, I probably still need to include the directory that contains .lib files. Which option should I use, and how? I tried the linker’s DEFAULTLIB option, but it’s not working. Thanks in advance!

Definitely check an nmake tutorial, there are, far more simple and
profitable. You are going to use them later, or say do a .bat batch, so
worth the time :-).On Mon, Apr 28, 2014 at 12:15 AM, stdq <fernando.karpinski at gmail.com> wrote:

Hello, everyone! I tried to set up SDL2 with Visual Studio 2013 Express,
but didn’t succeed. So, I’m trying to compile a SDL2 program from the
command line. The file name is main.cpp. My command so far is

cl main.cpp /I C:\sdl2\include /link /SUBSYSTEM:WINDOWS

However, I probably still need to include the directory that contains .lib
files. Which option should I use, and how? I tried the linker’s DEFAULTLIB
option, but it’s not working. Thanks in advance!


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org