想知道如何在命令行下使用编译器,好像是cl.exe吧。
如何指定include和lib的路径,就像bcc32的-L和-I参数。
如何指定输出文件的路径。

解决方案 »

  1.   

    看MSDN:
    MSDN->Visual Tools and Languages->Visual Studio 6.0 Documentation->Visual C++ Documentation->Using Visual C++->Visual C++ Programmer's Guide->Compiling and Linking->Overviews->Building on the Command Line
      

  2.   

    看MSDN:
    MSDN
      Visual Tools and Languages
        Visual Studio 6.0 Documentation
          Visual C++ Documentation
            Using Visual C++
              Visual C++ Programmer's Guide
                Compiling and Linking
                  Overviews
                    Building on the Command Line
      

  3.   

    看MSDN:
    MSDN
      Visual Tools and Languages
        Visual Studio 6.0 Documentation
          Visual C++ Documentation
            Using Visual C++
              Visual C++ Programmer's Guide
                Compiling and Linking
                  Overviews
                    Building on the Command Line
      

  4.   

    如果你正常方式安装 vc 
    那么启动 cmd.exe 或者 command.com
    可直接使用例如 cl.exe  hello.cpp
    关于vc本身的头文件和库文件,
    已经在环境变量中设置了,你可以不用考虑cl /c  hello.cpp 表示只编译
    link hello.obj 表示连接或者 cl hello.cpp 编译和连接如果你有额外的库文件
    可以如下link xxx.lib hello.obj
    ================================================================
    Country roads, take me home to the place I belong, West
    0AVirginia, Mountain Mama. Take me home, country roads.
    ================================================================
      

  5.   

    cl /I[directory]  //可多次使用/I
    Link /LIBPATH:[dir]  //连接库路径
    Link /OUT:[filename]  //可改变输出文件的路径和名字