We use the Microsoft C++ compiler in much the same way as GCC on Windows. The following is a few examples from our Makefiles if it helps (personally I find the documentation for commandline MSVC usage to be really lacking!).
.cpp unit to .obj
cl.exe /nologo /EHsc -c -I..\..\..\import\msvc\include -I..\..\ $(CXXFLAGS) /Fo$@ $<
relevant .obj files to static lib. Here we are also including the GLEW32s.lib into our static lib so it doesnt need to be linked in during the final step.
lib.exe /OUT:..\..\lib\mutiny.lib $(OBJ) ..\..\import\msvc\lib\GLEW32s.lib
Link other .obj files to final .exe and then link against required libs and our static lib we generated in the step above
link.exe /SUBSYSTEM:WINDOWS /OUT:$(BIN) $(OBJ) /LIBPATH:..\..\..\import\msvc\lib /LIBPATH:..\..\..\lib OpenGL32.lib GLU32.lib SDLmain.lib SDL.lib mutiny.lib $(LDFLAGS)
The main thing to notice is the /LIBPATH parameters are similar to -L on gcc. Also note that there is no need for -l, you just specify the name of the lib (including the .lib suffix).
Edited by Karsten_, 04 November 2013 - 04:44 AM.