我有vs2012 pro
而cl.exe
位于此路径中“E:\Microsoft Visual Studio 11.0\VC\bin”
test.cpp
是一个“hello world”
计划
我运行vcvars32.bat
,然后输入F:\ gts> cl test.cpp:
F:\gts>cl test.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 17.00.50727.1 for x86
Copyright (C) Microsoft Corporation. All rights reserved.
cl : Command line warning D9024 : unrecognized source file type 'E:\Microsoft', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'Visual', object file assumed
cl : Command line warning D9024 : unrecognized source file type 'Studio', object file assumed
cl : Command line warning D9024 : unrecognized source file type '11.0\VC\bin', object file assumed
test.cpp
Microsoft (R) Incremental Linker Version 11.00.50727.1
Copyright (C) Microsoft Corporation. All rights reserved.
然后link.exe
跟我说说:
/out:Microsoft.exe
E:\Microsoft
Visual
Studio
11.0\VC\bin
test.obj
LINK : fatal error LNK1181: cannot open input file 'E:\Microsoft.obj'
所以我可以获得* .obj但无法获得* .exe
我认为cl.exe将路径“E:\Microsoft Visual Studio 11.0\VC\bin”
作为第一段,但我不知道原因
P.S。当我使用vs2012时,everthing是对的。