|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
' V( T' O1 N4 C a7 J, \/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
1 `1 a; Z. T% B+ `) E
% a7 ], S6 _8 B4 r+ q+ P这个头文件内容如下:
5 P3 x1 j/ ^+ N#ifndef QTCONCURRENT_RUNBASE_H6 q( H: X6 }8 z* K0 H% ?- d9 {1 U
#define QTCONCURRENT_RUNBASE_H- y* Q2 w6 k! i7 A, I
1 }" q1 g$ H7 b
#include <QtCore/qglobal.h>
0 Y, E; k9 O; W4 N
& X+ K x* W/ K#ifndef QT_NO_CONCURRENT1 \8 T- |% L5 \6 k; o9 y
! z! \* R9 \+ W# }% F) o; I" }#include <QtCore/qfuture.h>5 Q4 |- F; i; f( _, D$ _' j6 Z
#include <QtCore/qrunnable.h>
. c' ?/ A" e" ~! y5 E#include <QtCore/qthreadpool.h>
3 k" h2 z2 V. m u0 q8 q: I4 P0 F4 k4 x+ ^4 q1 M
QT_BEGIN_HEADER* O) T& ]7 ?+ q
QT_BEGIN_NAMESPACE
6 ]& E. @$ h% W3 g s# W1 J0 E/ y2 S R" j3 W. @
QT_MODULE(Core)5 h+ H& O. Z3 c8 p4 ~- C
. Q0 t6 r0 L' P#ifndef qdoc
?( f8 l) h- \, e) _# O; S& |4 h+ m" _
namespace QtConcurrent {; @3 q/ Z' \& i* r+ V8 s; q
' V" _( N( ?; Z7 l8 G v
template <typename T>
0 E$ h j7 F, X% @" \& Vstruct SelectSpecialization/ N* w2 B" C5 m+ y
{
7 \( Z; B% c! h/ g6 o template <class Normal, class Void>
/ t- ]: q1 K- E9 y. g) S; ? struct Type { typedef Normal type; };
0 U$ X3 x. j! r};$ P8 |; F, T* h
# ^; _, v5 c# `; e R* n; |# S, vtemplate <>2 q+ E( }$ Z; Q# D G
struct SelectSpecialization<void>
: D3 P# m* |+ E8 ~( j. B/ F{( X7 w5 f* ~3 {3 T& @* z7 d" _+ Y
template <class Normal, class Void>8 t- i1 ^' a5 r
struct Type { typedef Void type; };
: w6 K% C% r1 o7 e/ y* P* V5 X};
. T+ I) F$ c0 P3 E2 W0 m; U$ j( N, S0 Q( G* j9 x
template <typename T>
8 e4 Z' B5 U7 A+ U5 Uclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
7 H1 P% J6 v$ I5 @- d) n4 S{
" a8 Z& L8 A- epublic:! \# K a' Z% N, {) i
QFuture<T> start()
$ M. d7 y- v' l; w: G {* u8 {/ M# `. X6 P! D
this->setRunnable(this);" L; o) ^0 [7 M: U+ @
this->reportStarted();
k7 I% K9 J: d' O/ C/ H QFuture<T> future = this->future();
) Q7 e& ]. j7 ?9 P$ g QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);" p) h: S w: }5 K3 n
return future;; H" s2 o' w3 Z
}
+ y- ?0 J$ L. r- p7 ^: T4 |* g" K2 `1 n8 _9 Z: L6 K+ _, f
void run() {}' e0 N- }3 q7 Q. L1 u% f
virtual void runFunctor() = 0;! h: o* e) [) \% S
};8 q4 G& g! p1 b" P
) d9 W7 S- z% y
template <typename T>
3 |8 a' e$ {) q. M0 a2 s: Lclass RunFunctionTask : public RunFunctionTaskBase<T>
7 b9 @/ K) o/ c W$ B4 _/ x: l2 y{; g, _. U6 T4 }, u$ V
public:2 H5 y- t7 o9 x8 U, R2 v) |1 D
void run()
4 h2 E- r. v* {9 a {
8 }* J7 J9 Y- ~' p/ d6 U0 a! n4 x" P if (this->isCanceled()) {
$ Q$ T2 @* }9 y; L( f) F3 u this->reportFinished();
1 n7 S$ j4 w* b8 c return;# C6 `0 s Y- y/ _
}9 w1 |& p: S; R1 s. r; s0 X- C
this->runFunctor();2 }1 ^7 _( q4 l1 s. _1 Q
this->reportResult(result);4 g1 D: _1 F; F7 s
this->reportFinished();
4 {" L$ c( j( ?, D$ Z1 c }$ h2 p0 E6 {. h# p6 }
T result;
: R/ R) n @" Y};
" K8 w3 b2 [3 x* j; S" q' ^% K# w
4 f* U+ L7 I* P9 ytemplate <>3 k% G0 K( r$ ]$ t9 x% ]& V
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
6 W3 [2 a" B, F& |{
+ m- J& T' V& g, v% }' _public:
& R) ~2 Q! u. b+ e7 A* a3 H' s void run(), M b) m( A* ]
{
t7 `) x: x* i9 Q# x% g if (this->isCanceled()) {1 W) z) W/ X( s0 J- w) K
this->reportFinished();' B n8 d8 x- A; V' H& n6 z# f: q0 N. C, r
return;
) b5 V, |; h+ S" R" m' n }: [2 H: K8 G3 \& Y2 o; l6 D
this->runFunctor();2 K) h+ Y. w4 _' A
this->reportFinished();% U5 ]: _! C/ E7 T, ]7 w, Z' p
} M) B# ]' n; l4 j9 c
};; v8 x3 z3 L( H; H; k9 Y2 ^
5 _7 t+ `4 j2 h! @5 a. L5 s
} //namespace QtConcurrent
( c0 d9 T, }/ b) A. P/ Z$ n0 `/ p/ q, i; s9 q, v& j
#endif //qdoc4 o8 N5 y& O# Y. e
; Q, w: l+ P9 i$ U9 OQT_END_NAMESPACE) `. N5 t" x T
QT_END_HEADER0 r% w5 @8 Z3 Y! l
) b9 B( l# \5 x* D, _% w5 L" {; X9 s#endif // QT_NO_CONCURRENT
5 Y3 s/ q% R/ y
/ w, X+ A1 Z" c6 D#endif
' Z& s% i% D+ g6 i: S
4 ~3 u7 O6 ]+ Q |
|