相关疑难解决方法(0)

cl.exe和ml.exe的问题

我使用cl命令编译cpp文件:

cl test.cpp  //the generated  test.exe can work well
Run Code Online (Sandbox Code Playgroud)

然后我用另一种方式:

cl /Fa /c test.cpp   //generate a test.asm assembly file
ml test.asm   // there failed!!!
Run Code Online (Sandbox Code Playgroud)

为什么?怎么解决?

源代码:

//:test.cpp 

 #include<iostream>
 using namespace std;
 int main()
  {
    cout<<"hello\n";
  }
Run Code Online (Sandbox Code Playgroud)

错误的信息:

组装:test.asm test.asm(1669):致命错误A1010:无法匹配的块嵌套

:?? $?6U?$ char_trait s @ D @ std @@@ std @@ YAAAV?$ basic_ostream @ DU?$ char_traits @ D @ std @@@ 0 @ AAV10 @ PBD @ Z


今天我在c中写了另一段代码

//test.cpp
#include<stdio.h>
void main()
{
  printf("hello");
}
Run Code Online (Sandbox Code Playgroud)

然后我编译代码

cl /Fa /c test.cpp …
Run Code Online (Sandbox Code Playgroud)

c++ compiler-errors cl.exe visual-studio

5
推荐指数
1
解决办法
1736
查看次数

标签 统计

c++ ×1

cl.exe ×1

compiler-errors ×1

visual-studio ×1