|
|
我对syslink进行交叉编译到arm,但是出现如下错误:7 a% g" T X# d1 U! F" e
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
: [% J; I8 E I! V* e3 d; h5 O
1 H9 k {! ~, C% \: S" m: l这个头文件内容如下:& s: Z' { Q* g; X
#ifndef QTCONCURRENT_RUNBASE_H
- O& h% d% j) D; X#define QTCONCURRENT_RUNBASE_H& o7 W" b; }# r
: o3 ?; R% k; R4 f#include <QtCore/qglobal.h>8 g6 p6 }# b9 p
7 Z- U$ ?& A5 V5 Q. j0 ]9 |#ifndef QT_NO_CONCURRENT
5 b4 h) D: \. Y/ _( z" [9 x( L) r4 ]7 {- K$ p+ E8 U6 B/ [
#include <QtCore/qfuture.h>
, _" I" B- ]: S. @7 X1 L#include <QtCore/qrunnable.h>, N% Q7 v/ [6 Y
#include <QtCore/qthreadpool.h>5 J( B6 @9 u2 S5 M/ F* r
/ L! j3 s6 J" [+ D+ ^QT_BEGIN_HEADER
% E6 `! A$ \5 \5 B1 D7 C+ T4 A, HQT_BEGIN_NAMESPACE3 `8 D# O& P/ F
. g! `0 L* M7 e4 M2 a9 S H
QT_MODULE(Core)
; k% K& {' ^% L. m' _) s; U% {2 n2 f, L' \
#ifndef qdoc2 \0 X$ L+ J$ c4 y$ \9 B
) @ j. }# Y$ C) m; _5 \, `: k
namespace QtConcurrent {8 e d# f m0 A# D" E
! a: f2 P6 `: T. E* J' Otemplate <typename T>& ]% L0 p1 K; A
struct SelectSpecialization
6 i6 c1 \; [! x. k{
7 _: L9 y5 b2 ]' w/ b: ] x template <class Normal, class Void>) A- D W" L/ W
struct Type { typedef Normal type; };) `5 ~3 G4 R9 S& j1 P( ^5 G6 n
};8 i ~( p' t6 i1 v5 @
0 B4 y, J# A, j: z8 D
template <>
; t$ Q+ C6 [) Ystruct SelectSpecialization<void>2 g! F& c I3 L
{8 X& k' }3 B' g) M: v* u
template <class Normal, class Void>. _! z8 O( l0 n7 ^2 ?
struct Type { typedef Void type; };' A+ B# g# ~& y) C
};) c! b+ q% y) U/ r* X }
: N1 r% P* {# j* ^, V
template <typename T>
; b: g7 d. ?" {3 W% rclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
' ~: p+ H/ y+ d1 L3 |8 a{0 f4 _+ m Z- n2 ?+ A
public:% Z( u1 ?+ n# W
QFuture<T> start()
- U# M5 s5 z* S C( f {) Z) \1 p! m9 L5 {+ t
this->setRunnable(this);
8 W+ G9 Z! S& a) u5 z this->reportStarted();
7 K2 e8 |8 G0 S6 Z: A9 ` QFuture<T> future = this->future();5 r# X9 F* r+ o# C
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);: X( k3 S; B3 T9 ^1 K
return future;
; W t. v) d& ` }
0 s5 x2 p. {* N8 j' y/ k. A8 q' S0 P# K6 F7 ~' J
void run() {}, S3 C& b% ^# y$ ]# j( W
virtual void runFunctor() = 0;! v* m8 @" M: M1 z2 O
};
9 h! s; B. S9 K# G
* s. X) o' i" ~template <typename T>
) w- e* m6 @8 Yclass RunFunctionTask : public RunFunctionTaskBase<T>
% w) {8 R( u2 T6 t( I5 h0 B/ c{1 V- | Y4 c2 u2 H$ K" D' `& \
public:; r3 b$ s) _7 X
void run()
! `/ }+ h* G5 q" r5 ] ]9 U {$ C8 [1 L& V. J2 H
if (this->isCanceled()) {% `- A( P- T2 B3 N
this->reportFinished();
) ^' S" F; h7 w7 b3 \4 e- @! E return;5 K& C$ i8 p, O$ B" M. ~
}, r. z3 U& e( w# _( h# a5 \) r
this->runFunctor();) {2 w* R2 V) _$ q: B
this->reportResult(result); \3 I# X: Z Y
this->reportFinished();
: ^# ~" Y" N: P) t. V }" Q' ~) X% o, s8 d
T result;$ q, a9 c* m+ |/ v4 P
}; I, ]0 n/ M* \7 D3 z
7 p- M9 r) u/ o# V+ z- L- x) ?
template <> f. p! _' B" @4 f( _! \" n
class RunFunctionTask<void> : public RunFunctionTaskBase<void>. F+ e, B2 B' m0 M4 J
{
* G6 K/ O% R. d8 lpublic:. A5 l; b+ f" B4 ^- d5 Z2 N
void run()
) {7 }' m! O7 ^$ [+ Z {5 @) d1 ~; Z" @& N3 e1 @
if (this->isCanceled()) {" ], C( n: j+ N+ v" T% |: J
this->reportFinished();, F6 q; X! Y! @7 S8 I
return;. E1 s y1 V+ z
}
2 C5 E& U4 n3 b' z8 l! B this->runFunctor();
' {: l/ `+ S$ A# s6 H+ D1 B u this->reportFinished();
( R- w; N5 D5 } }) b' h: q! d/ b$ [ m. ~
};( a1 i( X5 I( l M6 D! ~
0 I4 k( M7 p8 [6 _- W$ S} //namespace QtConcurrent
2 g% f- f% Z/ k% {2 m* k
+ t) `. i& S0 F' ^#endif //qdoc8 T6 q% E1 H+ J0 F8 R6 ]- f
' t! H0 E' U* N1 _0 {! U4 bQT_END_NAMESPACE: C: U) q4 p0 T
QT_END_HEADER
: g+ w! p6 ^* n8 W' g* \* ^& c! W8 o7 ^0 e% U% P8 s, z1 q
#endif // QT_NO_CONCURRENT3 q7 Q. z' @. K5 n6 f+ [+ U
! M* G |" m' o#endif
( @1 i7 T' x) {4 n7 }' @9 S, B0 m R' Z& v1 v
|
|