|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
. U7 Q" y9 G/ d. a+ R/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'- C. }8 Q8 D1 ^! F# S
* K( s# j: a6 s3 _* q这个头文件内容如下:2 x% u) _* k5 f v9 F
#ifndef QTCONCURRENT_RUNBASE_H
4 l1 j, }) @7 t5 P! ~#define QTCONCURRENT_RUNBASE_H' ]" ?, o7 V3 `' V7 S
- V5 @+ j& _# j; A6 `& g: m$ Y#include <QtCore/qglobal.h>( N4 _% h8 P/ f7 d8 `
7 I1 s8 [3 { o$ {) I' M W
#ifndef QT_NO_CONCURRENT; V$ t" f, T* h; g, v1 ~* w. [
- Z) s8 m) D% R i% U, R#include <QtCore/qfuture.h>
. o3 u3 ^# h- c' \* x1 E; w#include <QtCore/qrunnable.h>
. ^: l! } r6 s& x B#include <QtCore/qthreadpool.h>
1 L9 R* R& C' M
: a, V; M! g' d. d, yQT_BEGIN_HEADER
8 n7 N$ [: q6 E) H& N) lQT_BEGIN_NAMESPACE6 c) a: l$ A3 d8 C& j, y
9 |3 l+ s) F7 |- GQT_MODULE(Core)* ?# A: ]6 J% `4 z0 H' p% W
) D7 I: \) ^; ?. n4 j
#ifndef qdoc; i) l+ n+ \* d) {* u' I
1 {( S* J3 z; ]namespace QtConcurrent {
- c+ e, I& X# ?; Y6 J' D5 i: {
# l7 s8 Q. _5 _5 stemplate <typename T>
: M: n. b8 m1 h( bstruct SelectSpecialization: F2 c, f, F, b+ N
{& \% l5 a( x. d- w, o! K$ q
template <class Normal, class Void>
: p7 S) i w3 g/ R# G- s5 S struct Type { typedef Normal type; };- { g: [0 u9 V* ^! I8 r
};
+ E1 Z6 ^# z: R3 A; {7 E& y( L* X. V: X
template <>
Z* V/ ]4 @6 z0 \0 \struct SelectSpecialization<void>* m5 h" R; X" m* z' {; ]
{
( u& Q6 V! N3 U8 W6 g template <class Normal, class Void>
( n" Y/ I( |2 w$ ?4 h) D2 A# r struct Type { typedef Void type; };
+ h. c: R$ [- x! e5 V};
. N2 W+ Y3 S8 }- x$ k4 F; e' m a- D* J/ }& Y. q
template <typename T>
# R7 |, H4 F! j' X& U3 o Zclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
, k1 C/ F- Z& j; @# E8 f{# y4 }0 G( E3 u/ q9 @) g
public:
. N1 ]# E2 v5 g" V4 p4 ` QFuture<T> start()
5 Y8 d) o) X+ y% k; N {, `. v0 G( ~) I% ^
this->setRunnable(this);/ z8 `& ]" c/ p3 l6 ]$ o( w
this->reportStarted();; y% [9 a0 o8 `: g8 T
QFuture<T> future = this->future();
& C7 E1 V" R4 y2 X* X) b QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
, v& j' e! n1 a3 `8 r/ h. s2 m$ M return future;0 i9 w- e/ a' z* f3 Q! C8 W, {" j1 p
}/ P" [; G) R2 }1 A
9 z0 X. u) @: L4 F9 q' f5 o0 t! v1 q
void run() {}% ]- W8 m9 h& J- Q
virtual void runFunctor() = 0;5 ?+ O* k. l g+ ^) }
};
% {3 R3 M+ Z6 V& E- H( ?5 ~
8 A; l3 F. L" r* \9 dtemplate <typename T>, @! V( H% g3 Q, e+ {4 C0 f' v
class RunFunctionTask : public RunFunctionTaskBase<T>
+ }) s! h2 W6 u% A, j0 u' b{
; h/ o" ^3 ?" ^7 m5 h+ Wpublic:
J( D3 C! g+ \; E) U/ Z: J& s void run()
6 ?1 _' q% K+ h( W1 z3 M. z {% B7 ?3 p' c% P# J
if (this->isCanceled()) {
O/ w, @, x+ l# @' Q1 u this->reportFinished();
- k0 i4 E' K; S1 i5 b return;: X% e/ q! s# R
}. I& y! L( v, C: h) d) a1 G
this->runFunctor();
0 v+ _0 n/ ~3 \- i; w6 W+ F8 F this->reportResult(result);, \% ?$ \4 C1 B; f# n) S% t# z+ j
this->reportFinished();. V6 Q! ]# L0 R
}0 H- p* v% C! `7 a
T result;) ]* {' k3 M2 b, K N% B! A2 d
};1 h, E3 s6 r9 S+ J
( i8 w- L; `! }% }1 e0 D$ Itemplate <>, P! Q ]9 ~. s; w+ K: F8 A7 `
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
1 Z1 X0 E& d2 k4 u{$ W; E2 e$ w. `. k1 K3 b7 J
public:7 M6 e. A- T$ s( t% C
void run()
; W# m$ Q1 W. \1 x7 C0 h {1 N+ E' Q. K- B# [
if (this->isCanceled()) {- O& N5 \# c6 i3 k
this->reportFinished();9 G; E. v/ m: F; h" \
return;0 T" y0 Y- ~. z9 @+ ~7 l+ j, L5 F
}
; E6 @7 I4 F4 z/ w this->runFunctor();/ h0 d( {* i. l C" e: g
this->reportFinished();' Y2 E: R1 x' c6 ]# s- {
}" ~7 ~( N2 X, q* d& F- [
};
5 i4 |, P+ v7 R2 w# ?# ]! ?, _5 u& y1 r! g' U( \$ W
} //namespace QtConcurrent
+ Y. n$ o7 S0 A& Q5 {# [4 c" Z( Y$ {" ^; |, F( ?9 H/ h
#endif //qdoc
. L- O0 |) n$ c) t: q' D1 K$ _5 r' }1 J# r
QT_END_NAMESPACE
0 H2 E; B" i" {5 g3 JQT_END_HEADER0 r! ^$ x! j% u6 ?2 Y# m s
( P, y8 h2 h& m+ C' U9 h#endif // QT_NO_CONCURRENT
6 f% w+ f5 }( |3 l6 {, K/ G
, m* |8 g9 e/ I& B$ m#endif
0 X }; C: H% `$ {: e, o6 Z9 k
6 {# O0 C) S+ i( c% m/ A |
|