打印
[LOOK]

老师,大叔看看,求教一个LOOK头文件问题

[复制链接]
2083|6
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
用LOOK写程序时,我想让程序更好看点就分多个.cpp和.h文件,不过发现自己建的.cpp和.h文件如果#include"look.h"就会编译错误,这样我们就不能在别的文件里定义系统的派生类,以后写程序所有的派生类只能写在向导创建的那个.cpp和.h文件里了。是不是我哪里方法用错了呢,
错误提示:
C:/LOOK/ARM/include/look:47:2: error: #error This file requires compiler and library support for the upcoming ISO C++ standard, C++0x. This support is currently experimental, and must be enabled with the -std=c++0x or -std=gnu++0x compiler options.
C:/LOOK/ARM/include/co:48:9: error: 'link' has not been declared
C:/LOOK/ARM/include/co:49:9: error: 'link' has not been declared
C:/LOOK/ARM/include/co:51:26: error: 'base' has not been declared
C:/LOOK/ARM/include/co:51:32: error: expected '{' before 'sched_t'
C:/LOOK/ARM/include/co:51:40: error: invalid type in declaration before '{' token
C:/LOOK/ARM/include/co:51:40: warning: extended initializer lists only available with -std=c++0x or -std=gnu++0x
C:/LOOK/ARM/include/co:52:3: error: expected primary-expression before 'public'
C:/LOOK/ARM/include/co:52:3: error: expected '}' before 'public'
C:/LOOK/ARM/include/co:52:3: error: expected ',' or ';' before 'public'
C:/LOOK/ARM/include/co:54:4: error: 'task_t' does not name a type
C:/LOOK/ARM/include/co:55:17: error: expected initializer before '__OPT_ATTR__'
C:/LOOK/ARM/include/co:57:4: error: 'task_t' does not name a type
C:/LOOK/ARM/include/co:59:3: error: expected unqualified-id before 'protected'
C:/LOOK/ARM/include/co:61:4: error: 'base' does not name a type
C:/LOOK/ARM/include/co:62:4: error: 'base' does not name a type
C:/LOOK/ARM/include/co:64:3: error: expected unqualified-id before 'protected'
C:/LOOK/ARM/include/co:67:3: error: expected unqualified-id before 'protected'
C:/LOOK/ARM/include/co:71:4: error: 'base' does not name a type
C:/LOOK/ARM/include/co:75:1: error: expected declaration before '}' token

相关帖子

沙发
hotpower| | 2011-9-28 09:14 | 只看该作者
这个问题需要找老师。
我认为look应该升级一次。

使用特权

评论回复
板凳
nixianmin|  楼主 | 2011-9-28 09:41 | 只看该作者
如果不能,那么到以后主要的文件中的内容会写的很长了,期待老师解答

使用特权

评论回复
地板
john_lee| | 2011-9-28 09:52 | 只看该作者
本帖最后由 john_lee 于 2011-9-28 09:55 编辑

首先,确认工程文件分组“C++ Source”的Options设置:


重点检查Misc Controls是否有-std=c++0x的选项。

第二,确保新建的cpp文件都在C++ Source组中。

使用特权

评论回复
5
hotpower| | 2011-9-28 10:26 | 只看该作者
老师的贴图很漂亮。

使用特权

评论回复
6
nixianmin|  楼主 | 2011-9-28 10:37 | 只看该作者
搞定了,原来是老师说的分组的问题,我是自己建了个人的文件组,改一下就好了,谢谢老师

使用特权

评论回复
7
gdmgb520| | 2011-9-28 13:20 | 只看该作者
mark一下,备用

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:电机控制,TI InstaSpin Foc交流群:335663930

40

主题

431

帖子

6

粉丝