嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
5 ?1 c5 R4 @0 x$ c$ H$ U
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
3 M2 @, {0 A. O- H: L
9 [! z2 m4 a6 d H' s7 W# E
这个头文件内容如下:
( c3 h4 J. f5 ~5 _, _
#ifndef QTCONCURRENT_RUNBASE_H
+ H2 V: t9 H! ?' f3 ^- V3 s
#define QTCONCURRENT_RUNBASE_H
0 K( u+ Z! E, u# Q( D; y
3 A( l; d8 w5 t7 b' Z+ l4 ~, U! K$ J# i
#include <QtCore/qglobal.h>
" x; B5 S7 A6 x& \& n' t+ M
& W. t+ k; \( i; b
#ifndef QT_NO_CONCURRENT
9 T3 i% M' N% o7 S( R7 `
. A: M; G, Y. j5 [8 ~
#include <QtCore/qfuture.h>
3 O9 @; b; v% b3 n
#include <QtCore/qrunnable.h>
9 o4 }5 \! i$ O: u
#include <QtCore/qthreadpool.h>
4 }* ~7 {4 R* w4 v% y; |+ V
' W) X5 S# @* s: o# R# ]
QT_BEGIN_HEADER
' m Z( \, v( ^" M) E/ ]& i8 M7 U
QT_BEGIN_NAMESPACE
: y/ c/ H' M+ U7 U W3 A
' W1 p7 ]+ N% ^) c! o
QT_MODULE(Core)
" A0 Z1 N7 |" ?1 T! B; W8 Z4 X
- t, S5 `5 D6 ?* I: p* K
#ifndef qdoc
: R/ o1 z6 z C5 n/ K7 _$ V
5 W C ]$ W2 a( o6 [2 n" q
namespace QtConcurrent {
8 L$ b8 n3 ?4 Z, E
, p* E5 B" z7 H8 I
template <typename T>
. d% u7 n! h* I x/ |
struct SelectSpecialization
! c- }5 G+ c# C8 Z
{
2 t: W: r2 P4 E' \4 {
template <class Normal, class Void>
) }; H3 }' w( ^9 k' V1 W
struct Type { typedef Normal type; };
$ f& Y8 |: C+ `9 `
};
" Q- ~0 G; q! o* a
3 g0 n& I5 w8 h+ y, ^) F
template <>
/ f# `2 u) M% s, y$ n5 q4 F8 k
struct SelectSpecialization<void>
' o2 V8 x% }4 o( r
{
; S6 ^2 V* _3 B4 _; b8 F8 s
template <class Normal, class Void>
& v' O# n+ E0 U! N8 y7 U
struct Type { typedef Void type; };
6 m! b9 @$ _9 D( G- i6 `( N/ L
};
7 T- M* `* ~$ v$ l1 W
% E+ q+ k8 t: J
template <typename T>
" Y' ]( Z+ M' q9 m2 R% \; d
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
$ {9 h% ?0 A: n! A7 k
{
( `, l7 |% y a7 l
public:
$ D$ i# U: t: |8 q$ e0 K
QFuture<T> start()
6 Q0 ]1 G+ K6 _4 w2 G% U
{
# }; q% Z% E0 ?( b1 Z1 j' M( f
this->setRunnable(this);
9 O% Y5 w8 ~% M7 A3 e; Z _
this->reportStarted();
: o- J! X9 N6 `/ f1 Y
QFuture<T> future = this->future();
" `( H8 R; C+ v8 f
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
, f Y, e2 _5 L6 A N% V( A; b
return future;
3 }1 u- N" c: D1 \3 R0 M5 w9 U5 j
}
6 o {0 B9 t; \; m' X
9 t8 g: p. V0 f; \8 F
void run() {}
9 I3 b9 ?% R7 p! J) U8 o* i, H5 m
virtual void runFunctor() = 0;
- `8 m. y( W- ~4 D
};
; X9 B' f9 {$ \
- x/ a3 j6 c% c2 l1 l6 S3 _
template <typename T>
! _$ J5 D" P0 [
class RunFunctionTask : public RunFunctionTaskBase<T>
" h- {' J; ?! s9 }+ f/ [7 r6 s
{
# `; Y b2 \4 ^" R n
public:
, V9 A7 S/ X. ^- |
void run()
" w4 ^7 s2 q/ a1 s5 |) I0 P( f
{
9 K0 r& g' _1 }# ^& p
if (this->isCanceled()) {
1 z4 @: O/ z8 f$ h9 d7 @
this->reportFinished();
" @; A8 Q( R! t. W/ s1 Q8 f
return;
, E# L) a' o7 x% m) L3 F9 C- I
}
5 H7 Y# a, S- U; L+ f& O- Q9 N
this->runFunctor();
3 m$ [7 |6 G A7 s5 m+ A
this->reportResult(result);
; ^& z0 d$ X7 W$ \$ O3 Q
this->reportFinished();
! t* a7 E) v) [7 P
}
; a+ M% L w2 P4 D2 a, Q# o
T result;
4 |7 T) ]& d* c. f5 E1 \
};
+ f9 V$ Y, d; }6 a
+ I2 ^- Y, q! G( j0 k5 A
template <>
2 ~# P u ^/ r
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
) F8 j5 @/ z% t9 X
{
: F2 U1 H5 Q8 P* Q6 d
public:
: }+ C0 [0 p( @3 Y* L' T: f9 q
void run()
. u4 @8 `4 ?9 K L/ G
{
: g) i q# t, q$ I% d
if (this->isCanceled()) {
# D4 _; ]5 g7 {( g, C
this->reportFinished();
1 u; ^5 w9 y" V3 H
return;
$ G# C" g; d$ D: Z9 N7 D: L; s0 A
}
+ E! u4 [) U7 U
this->runFunctor();
1 z$ K7 V; B* p" E2 @) C) o
this->reportFinished();
1 \/ e5 ?& }& O! }% A
}
/ o2 b2 z6 h' l0 d
};
! R3 W" e$ w7 f' x5 s! H9 D
& z3 ~7 G3 T2 Z ?0 ~) Y2 Y
} //namespace QtConcurrent
. D9 X# b/ a- D: ?' i9 t( D' T
2 Z. d4 T$ \( a
#endif //qdoc
; Z i4 V8 g& c) c6 I* S
; V, W8 U, {; ^* C# ]
QT_END_NAMESPACE
5 K% w% e' n! w l! {# K
QT_END_HEADER
( v5 [& _: |5 p/ g
# J& G% b- o3 C
#endif // QT_NO_CONCURRENT
+ H! c# V! a$ H, }! K
_7 z( r( `8 d
#endif
4 o& L6 e$ h) {4 Y- ~9 k6 X
$ L. a/ v. p$ S
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
8 C) l8 i! S: D. a
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4