当前位置: 技术问答>linux和unix
qt编译出错,大侠来帮帮忙啊
来源: 互联网 发布时间:2016-05-09
本文导语: 配置 tmake 1.11 cross 2.95.3 qt-x11-2.3.1 qt-embedded-2.3.7 编译成的时候出现如下: arm-linux-g++ -o Spectrum Spectrum.o main.o Spectrum.o moc_Spectrum.o moc_Spectrum.o -L/usr/local/arm/2.95.3/lib -L/gui/qt-2.3.7/lib -lm -lqte Spectr...
配置 tmake 1.11 cross 2.95.3 qt-x11-2.3.1 qt-embedded-2.3.7
编译成的时候出现如下:
arm-linux-g++ -o Spectrum Spectrum.o main.o Spectrum.o moc_Spectrum.o moc_Spectrum.o -L/usr/local/arm/2.95.3/lib -L/gui/qt-2.3.7/lib -lm -lqte
Spectrum.o(.text+0x0): In function `Spectrum::Spectrum[not-in-charge](QWidget*,
char const*, unsigned)':
: multiple definition of `Spectrum::Spectrum[not-in-charge](QWidget*, char const*, unsigned)'
Spectrum.o(.text+0x0): first defined here
Spectrum.o(.text+0x5b4): In function `Spectrum::languageChange()':
: multiple definition of `Spectrum::languageChange()'
Spectrum.o(.text+0x5b4): first defined here
Spectrum.o(.text+0x2a4): In function `Spectrum::Spectrum[in-charge](QWidget*, char const*, unsigned)':
: multiple definition of `Spectrum::Spectrum[in-charge](QWidget*, char const*, unsigned)'
Spectrum.o(.text+0x2a4): first defined here
Spectrum.o(.text+0x548): In function `Spectrum::~Spectrum [not-in-charge]()':
: multiple definition of `Spectrum::~Spectrum [not-in-charge]()'
Spectrum.o(.text+0x548): first defined here
Spectrum.o(.text+0x568): In function `Spectrum::~Spectrum [in-charge]()':
: multiple definition of `Spectrum::~Spectrum [in-charge]()'
Spectrum.o(.text+0x568): first defined here
Spectrum.o(.text+0x588): In function `Spectrum::~Spectrum [in-charge deleting]()':
: multiple definition of `Spectrum::~Spectrum [in-charge deleting]()'
Spectrum.o(.text+0x588): first defined here
Spectrum.o(.text+0x6d4): In function `Spectrum::Draw()':
: multiple definition of `Spectrum::Draw()'
Spectrum.o(.text+0x6d4): first defined here
moc_Spectrum.o(.text+0x0): In function `Spectrum::className() const':
: multiple definition of `Spectrum::className() const'
moc_Spectrum.o(.text+0x0): first defined here
moc_Spectrum.o(.bss+0x0): multiple definition of `Spectrum::metaObj'
moc_Spectrum.o(.bss+0x0): first defined here
moc_Spectrum.o(.text+0xc): In function `Spectrum::initMetaObject()':
: multiple definition of `Spectrum::initMetaObject()'
moc_Spectrum.o(.text+0xc): first defined here
moc_Spectrum.o(.text+0xf0): In function `Spectrum::staticMetaObject()':
: multiple definition of `Spectrum::staticMetaObject()'
moc_Spectrum.o(.text+0xf0): first defined here
moc_Spectrum.o(.text+0x70): In function `Spectrum::tr(char const*)':
: multiple definition of `Spectrum::tr(char const*)'
moc_Spectrum.o(.text+0x70): first defined here
moc_Spectrum.o(.text+0xb0): In function `Spectrum::tr(char const*, char const*)':
: multiple definition of `Spectrum::tr(char const*, char const*)'
moc_Spectrum.o(.text+0xb0): first defined here
/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/../../../../arm-linux/bin/ld: skipping incompatible /gui/qt-2.3.7/lib/libqte.so when searching for -lqte
/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/../../../../arm-linux/bin/ld: cannot find -lqte
collect2: ld returned 1 exit status
make: *** [Spectrum] Error 1
不知道错误在哪 怎么解决, 请大家帮帮忙 谢谢!
编译成的时候出现如下:
arm-linux-g++ -o Spectrum Spectrum.o main.o Spectrum.o moc_Spectrum.o moc_Spectrum.o -L/usr/local/arm/2.95.3/lib -L/gui/qt-2.3.7/lib -lm -lqte
Spectrum.o(.text+0x0): In function `Spectrum::Spectrum[not-in-charge](QWidget*,
char const*, unsigned)':
: multiple definition of `Spectrum::Spectrum[not-in-charge](QWidget*, char const*, unsigned)'
Spectrum.o(.text+0x0): first defined here
Spectrum.o(.text+0x5b4): In function `Spectrum::languageChange()':
: multiple definition of `Spectrum::languageChange()'
Spectrum.o(.text+0x5b4): first defined here
Spectrum.o(.text+0x2a4): In function `Spectrum::Spectrum[in-charge](QWidget*, char const*, unsigned)':
: multiple definition of `Spectrum::Spectrum[in-charge](QWidget*, char const*, unsigned)'
Spectrum.o(.text+0x2a4): first defined here
Spectrum.o(.text+0x548): In function `Spectrum::~Spectrum [not-in-charge]()':
: multiple definition of `Spectrum::~Spectrum [not-in-charge]()'
Spectrum.o(.text+0x548): first defined here
Spectrum.o(.text+0x568): In function `Spectrum::~Spectrum [in-charge]()':
: multiple definition of `Spectrum::~Spectrum [in-charge]()'
Spectrum.o(.text+0x568): first defined here
Spectrum.o(.text+0x588): In function `Spectrum::~Spectrum [in-charge deleting]()':
: multiple definition of `Spectrum::~Spectrum [in-charge deleting]()'
Spectrum.o(.text+0x588): first defined here
Spectrum.o(.text+0x6d4): In function `Spectrum::Draw()':
: multiple definition of `Spectrum::Draw()'
Spectrum.o(.text+0x6d4): first defined here
moc_Spectrum.o(.text+0x0): In function `Spectrum::className() const':
: multiple definition of `Spectrum::className() const'
moc_Spectrum.o(.text+0x0): first defined here
moc_Spectrum.o(.bss+0x0): multiple definition of `Spectrum::metaObj'
moc_Spectrum.o(.bss+0x0): first defined here
moc_Spectrum.o(.text+0xc): In function `Spectrum::initMetaObject()':
: multiple definition of `Spectrum::initMetaObject()'
moc_Spectrum.o(.text+0xc): first defined here
moc_Spectrum.o(.text+0xf0): In function `Spectrum::staticMetaObject()':
: multiple definition of `Spectrum::staticMetaObject()'
moc_Spectrum.o(.text+0xf0): first defined here
moc_Spectrum.o(.text+0x70): In function `Spectrum::tr(char const*)':
: multiple definition of `Spectrum::tr(char const*)'
moc_Spectrum.o(.text+0x70): first defined here
moc_Spectrum.o(.text+0xb0): In function `Spectrum::tr(char const*, char const*)':
: multiple definition of `Spectrum::tr(char const*, char const*)'
moc_Spectrum.o(.text+0xb0): first defined here
/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/../../../../arm-linux/bin/ld: skipping incompatible /gui/qt-2.3.7/lib/libqte.so when searching for -lqte
/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/../../../../arm-linux/bin/ld: cannot find -lqte
collect2: ld returned 1 exit status
make: *** [Spectrum] Error 1
不知道错误在哪 怎么解决, 请大家帮帮忙 谢谢!
|
/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/../../../../arm-linux/bin/ld: skipping incompatible /gui/qt-2.3.7/lib/libqte.so when searching for -lqte
/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/../../../../arm-linux/bin/ld: cannot find -lqte
是不是编译qte的时候用到不是arm-linux-gcc?
qte和qtopia必须是同一个交叉编译器编译
/usr/local/arm/3.3.2/lib/gcc-lib/arm-linux/3.3.2/../../../../arm-linux/bin/ld: cannot find -lqte
是不是编译qte的时候用到不是arm-linux-gcc?
qte和qtopia必须是同一个交叉编译器编译
|
ding
|
-lqte -lts
是不是要加-lts
是不是要加-lts