Can I code and compile all type of Visual Studio Application from Command line?

后端 未结 3 1708
长发绾君心
长发绾君心 2021-01-06 12:43

I am in the very first step of using Emacs as my programming environment. I run it in DOS Prompt using emacs -nw and do the development there. It\'s quite unbel

3条回答
  •  误落风尘
    2021-01-06 13:11

    you have several command line tools at your service:

    • msbuild which builds your project from .sln files (which are like ant's build.xml files)
    • nmake which is an older build-system based upon Makefile files
    • pure cl.exe and link.exe

    all you have to do is launch the visual-studio-commandline prompt OR incoporate the environment of that prompt into your own shell/powershell/emacs-environment. have a look at the vcvars32.bat file and what it does, it is located somewhere in the installation folder of visual2008.

    you could also use other build systems (scons, cmake etc) which either are standalone (scons) or create native buildscripts for your compiler (cmake, would creates .slnin your case).

    to compile (and link) a simple binary which uses opengl you can do this:

     % cl /nologo opengl.cpp /link OpenGL32.lib GLu32.lib and GLaux.lib
    

    take a look at a nehe-tutorial.

提交回复
热议问题