标题:请帮忙看看这个make错误
作者:tomorrowlhd
日期:2010-01-21 12:27
内容:
在ubuntu环境下编写好可在ARM执行的hello程序,make时出现如下错误提示:
arm-linux-g++-c -I/include -I/include -pipe -DQWS -fno-exceptions -fno-rtti -O2 -Wall -W -DNO_DEBUG -DQTOPIA_APP_INTERFACE -I.moc/linux-arm-g++/ -o .obj/linux-arm-g++//hello.o hello.cpp
In file included from hello.h:3,
from hello.cpp:1:
hello_base.h:12:22: qvariant.h: No such file or directory
hello_base.h:13:21: qwidget.h: No such file or directory
In file included from hello.h:3,
from hello.cpp:1:
hello_base.h:21: error: expected class-name before '{' token
hello_base.h:24: error: ISO C++ forbids declaration of `Q_OBJECT' with no type
hello_base.h:24: error: expected `;' before "public"
hello_base.h:31: error: expected `:' before "slots"
hello_base.h:32: error: expected primary-expression before "virtual"
hello_base.h:32: error: ISO C++ forbids declaration of `slots' with no type
hello_base.h:32: error: expected `;' before "virtual"
In file included from hello.cpp:1:
hello.h:8: error: expected `)' before '*' token
hello.cpp:2:20: qlabel.h: No such file or directory
hello.cpp:4: error: expected `)' before '*' token
hello.cpp:4: error: expected `,' or `;' before '*' token
hello_base.h: In destructor `virtual HelloForm::~HelloForm()':
hello_base.h:26: error: `HelloBaseForm::~HelloBaseForm()' is private
hello.cpp:9: error: within this context
hello_base.h: In member function `virtual void HelloForm::SayHello()':
hello_base.h:28: error: `QLabel*HelloBaseForm::MessageLabel' is private
hello.cpp:14: error: within this context
hello_base.h:28: error: `QLabel*HelloBaseForm::MessageLabel' is private
hello.cpp:14: error: within this context
hello.cpp:14: error: invalid use of und ..
#1 [tomorrowlhd 01-22 11:02]
自己顶一下
#2 [lyf3560 03-18 11:35]
你头文件应该是写错了我记得好像在qt3.0以后头文件包含方法一般如下:#include;你也可以去lib下找找你要的那些库的名字,比对一下,还有就是看看你是不是少写了冒号,括号,大括号。。。。。。