请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

查看汇编出错

老师,您好,请问为什么我用compiler explorer 插件查看cpp的代码会报错,用mingw可以编译通过,但是汇编代码查看不了?

#include <iostream>

using namespace std;

int main() {
  cout << "hello" << endl;
  return 0;
}

图片描述

In file included from C:/msys64/mingw64/include/c++/9.2.0/bits/exception_ptr.h:40,
                 from C:/msys64/mingw64/include/c++/9.2.0/exception:143,
                 from C:/msys64/mingw64/include/c++/9.2.0/ios:39,
                 from C:/msys64/mingw64/include/c++/9.2.0/ostream:38,
                 from C:/msys64/mingw64/include/c++/9.2.0/iostream:39,
                 from e:\clionproject\cplus\111.cpp:1:
C:/msys64/mingw64/include/c++/9.2.0/new:125:8: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
C:/msys64/mingw64/include/c++/9.2.0/new:127:8: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
C:/msys64/mingw64/include/c++/9.2.0/new:139:8: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
C:/msys64/mingw64/include/c++/9.2.0/new:141:8: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
In file included from C:/msys64/mingw64/include/c++/9.2.0/bits/exception_ptr.h:40,
                 from C:/msys64/mingw64/include/c++/9.2.0/exception:143,
                 from C:/msys64/mingw64/include/c++/9.2.0/ios:39,
                 from C:/msys64/mingw64/include/c++/9.2.0/ostream:38,
                 from C:/msys64/mingw64/include/c++/9.2.0/iostream:39,
                 from e:\clionproject\cplus\111.cpp:1:
C:/msys64/mingw64/include/c++/9.2.0/new:173:15: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
C:/msys64/mingw64/include/c++/9.2.0/new:175:15: error: 'operator new' takes type 'size_t' ('long unsigned int') as first parameter [-fpermissive]
In file included from C:/msys64/mingw64/include/c++/9.2.0/bits/range_access.h:36,
                 from C:/msys64/mingw64/include/c++/9.2.0/string:54,
                 from C:/msys64/mingw64/include/c++/9.2.0/bits/locale_classes.h:40,
                 from C:/msys64/mingw64/include/c++/9.2.0/bits/ios_base.h:41,
                 from C:/msys64/mingw64/include/c++/9.2.0/ios:42,
                 from C:/msys64/mingw64/include/c++/9.2.0/ostream:38,
                 from C:/msys64/mingw64/include/c++/9.2.0/iostream:39,
                 from e:\clionproject\cplus\111.cpp:1:
C:/msys64/mingw64/include/c++/9.2.0/initializer_list:47:11: fatal error: definition of 'class std::initializer_list<_E>' does not match '#include <initializer_list>'
compilation terminated.

正在回答 回答被采纳积分+3

1回答

bennyhuo 2022-04-07 10:46:04

你写的是cpp,编译器找找有没有g++,可能还得配一下cpp版本

0 回复 有任何疑惑可以回复我~
  • 提问者 学以致用over #1
    抱歉,没有理解老师您的意思,我用gcc进行汇编操作是可以查看到汇编文档的,而且调用“g++ -v”命令可以看到
    Thread model: posix
    gcc version 9.2.0 (Rev2, Built by MSYS2 project)
    回复 有任何疑惑可以回复我~ 2022-04-07 12:07:26
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号