(菜鸟贴)gcc编译c++出错提示

来源:互联网 发布:守望先锋数据查询关闭 编辑:程序博客网 时间:2024/05/29 14:51

jonny@jonny-GF7050-M2:/media/Data/college/大二(下)/操作系统/课件/第十周课件$ gcc -linclude main.cpp Memory.h Page.h PageControl.h
gcc: error trying to exec 'cc1plus': execvp: 没有那个文件或目录
Memory.h:4: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘CMemory’
Memory.h:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
Memory.h:47: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
Memory.h:65: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
Page.h:3: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘cpage’
PageControl.h:3: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘CpageControl’
jonny@jonny-GF7050-M2:/media/Data/college/大二(下)/操作系统/课件/第十周课件$

 

由于gcc不支持c++的类调用,也不支持c++的部分命名方式。因此会出现上述问题~

原创粉丝点击