|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
. U5 f8 E" C9 N/ D7 b/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'% Y* W7 V% Q- m+ @/ l
, u, W' A0 @, T; U
这个头文件内容如下:
! ?0 ^: Y. A7 H+ |#ifndef QTCONCURRENT_RUNBASE_H& a/ V" Y7 e* P0 B
#define QTCONCURRENT_RUNBASE_H
9 |6 a- G- h. V% u& q# W8 d
$ G* b- O5 l+ _; C#include <QtCore/qglobal.h>
2 \* ?. y# r+ J, @9 G6 t+ J' _3 _1 G7 n
#ifndef QT_NO_CONCURRENT* r2 i3 r/ O2 B! }
t+ {+ k) e% d' ?#include <QtCore/qfuture.h>
$ K* r. [$ S7 a#include <QtCore/qrunnable.h>2 ?' o* C* s3 E9 A) q1 {/ U
#include <QtCore/qthreadpool.h>
6 p" l) x3 |3 v9 [) c7 A. G. M, p/ x2 z$ O) b2 v- W3 `
QT_BEGIN_HEADER
p9 X ^, L' A# n9 KQT_BEGIN_NAMESPACE
8 Q- w S6 G! m$ S5 d7 [* p# R/ s0 T9 [. W4 w7 T/ B
QT_MODULE(Core)* s; V" z, k( q) R* V( O0 U
6 \4 i; S" E8 ^' v1 i2 R1 W) M; P( V#ifndef qdoc% e% u% |# c1 n/ ?' w/ q
) U, ]* O' i% u* t8 t5 s$ x) ?
namespace QtConcurrent {
5 R1 }' s/ u3 y# B2 a& v8 u" d8 D# O$ e0 J2 G0 r
template <typename T>; p7 u& }+ Z1 ~
struct SelectSpecialization( q Y0 A, Z; e m5 y( ]
{
% C/ S, M) x0 ^! O# @6 C, y template <class Normal, class Void># S$ X/ N$ [ u) G" r: W
struct Type { typedef Normal type; };& r0 w$ D z, {# l
};- L/ C8 q" R. a; v: J+ B4 }
9 p/ i, x/ B" E" |, h0 N3 [
template <>3 k+ }' ]( N3 G9 e0 [8 \. F. x
struct SelectSpecialization<void>4 }! o) ]3 b# H9 o- r) o
{: F; H8 m( Z5 L* b" R, r3 b- ?
template <class Normal, class Void>0 X( L, Z0 J: D' W. B1 R
struct Type { typedef Void type; };
! ]- ~+ L: I: E% X3 Z};
9 j/ x- ~" `$ ^4 A: e6 y3 r' _, D4 z+ ?
template <typename T>& p. J9 k1 R* X
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
4 O( D1 W; U6 a. @5 u& R{
- F U9 H( s6 J4 k( Ypublic:
* r3 T& {8 A4 q& ?. o" C" m5 e, | QFuture<T> start()- w) X, r3 S" N2 q& v2 e
{
6 V$ O$ T' } I- t7 S* U9 J this->setRunnable(this);2 I3 O. f8 ]+ G, K: F- }4 s
this->reportStarted();
8 L$ d$ |9 y) T8 ]* W( w% @3 | QFuture<T> future = this->future();
5 S& m. N$ @- \$ \+ B- c QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
, |. E$ A C$ z7 X6 w return future;- y _8 ^* i4 N6 b, ~
}
E, V: g% r5 M2 P+ W# F
& j# b4 w. \6 R5 N. v4 { void run() {}
* c; W; v# x3 i# o e virtual void runFunctor() = 0;
5 ~* b! |/ @" B8 _; c5 F, Z};; `# t- ]" h8 Y) j; d7 `! @! n
( s# B6 W7 j/ ?$ b% Xtemplate <typename T>! p7 c& G7 K+ c9 s" U
class RunFunctionTask : public RunFunctionTaskBase<T>
% P& g% M. N& ]{# X4 d, y+ x- {" ^5 A
public:; e6 P$ l- K' O
void run(): C* k$ J1 E+ Y Q' U& |# S. {
{
5 g4 H* ]4 f B8 p# Z if (this->isCanceled()) {/ I" e3 f) u/ @, B
this->reportFinished();
/ U( t, d8 F/ K( G/ g X return;
. M& v, r- w, s2 A: F4 l- f }+ ]+ P, i+ \0 u9 A" e( A' o9 G
this->runFunctor();$ V' R1 S* @1 O( j! D( e( n# [
this->reportResult(result);
# B/ F+ n9 u9 i V this->reportFinished();* h2 Z6 m. v/ M1 i- @4 Y% D
}' ]5 U" I7 T! ~- @, e- G6 H1 S7 }
T result;
/ k; J: S& T& S! |, o. f. f+ x};6 s& d u3 C6 Y9 X+ w3 n0 e
7 y) }7 X( `. J; X+ j$ ntemplate <>
" ^7 A& }* K$ Bclass RunFunctionTask<void> : public RunFunctionTaskBase<void>
: t! S' A6 y5 o4 |# e+ W) d{
( y/ G$ p1 g% Opublic:
: K I: q4 F% {3 q void run()
$ X- F6 I6 k- ` d, R/ J {/ `+ U. v" t. I! v
if (this->isCanceled()) {' W1 |3 b+ C* O
this->reportFinished();( f& p0 U. d0 D; K2 Z0 ^% B7 V( L+ A
return;
7 k* \! B! m& I3 N& f. g, O }
% L- f2 g S6 N this->runFunctor();' q9 t" @4 X: |* y/ E" z! ?5 r
this->reportFinished();
$ ^: \, F* z7 S" C8 \ }
& A- s8 d! [9 k l3 M: O7 I1 f};) O ]% G8 s+ y3 X9 t( l
. G1 U" E' W8 | h2 P
} //namespace QtConcurrent" R7 g$ B' Q7 [* c9 `) E' y' a
# \, r$ G- P3 E7 A! _9 X" y. Q
#endif //qdoc
3 P: |- k3 {# E, [8 e
# R, v2 f. M' c/ IQT_END_NAMESPACE) I7 \1 N, g4 f1 O% z2 x' _
QT_END_HEADER. [+ ?3 e3 \; T9 z( C# K8 i8 w
; t5 I/ Y" M ~! z& P( J! U# K#endif // QT_NO_CONCURRENT) k* p0 t4 }5 d9 t" m
A1 h2 G! n3 g; X: p3 g. y#endif, S9 X+ I( d. S
$ T1 @7 `; u4 S |
|