|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
1 h5 N& I$ }9 `/ l, p5 C& y3 V; t/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'- g6 j. R% f, f6 V, |7 j# {
1 N6 K& @7 S- Q; D R, c
这个头文件内容如下:
+ a$ ]- g# Q3 Y# X3 d% D7 e* W#ifndef QTCONCURRENT_RUNBASE_H+ u2 ~ x R) J* Q" d: a% j# _
#define QTCONCURRENT_RUNBASE_H3 `* T4 M! ?2 f( L2 y8 Y
, u4 c% G0 ]/ W6 }7 H1 j
#include <QtCore/qglobal.h>3 ~! |+ ]7 G: s8 ~0 I7 s
' t! Z8 Q K, c2 S
#ifndef QT_NO_CONCURRENT! k0 m2 i9 [) F
; Q: Q% ^1 P1 l
#include <QtCore/qfuture.h>
5 a& Y q1 S: Z+ L#include <QtCore/qrunnable.h>
# C e6 i, \/ {; j: n#include <QtCore/qthreadpool.h>& ~+ Q E* m; g2 L, s" S
' }, o9 _+ W9 q0 ^! {QT_BEGIN_HEADER
) H5 t9 K( t9 ]! l9 s- Z1 L8 \9 u, w: UQT_BEGIN_NAMESPACE
/ Z! ~4 [! ]6 f C; w0 X! n9 G+ O7 p U0 _+ d- a) Y
QT_MODULE(Core)' E+ O! j2 }+ s$ o
( A5 z* Y* B& g( y N; s& \6 [$ T
#ifndef qdoc
4 G% h6 i, j' F8 b2 P2 o Y6 d5 ~! j0 L1 R6 a3 h- q" A
namespace QtConcurrent {0 l, [' |/ H' x1 c# n
8 p0 H9 q" D( W9 v
template <typename T>
2 G5 T; R) {+ b- Z Astruct SelectSpecialization
+ k* v; O* y* j- ?{/ q, y+ ~1 Y e: O, ?. C3 k
template <class Normal, class Void>
. r( D/ k+ f6 B% l9 v( ] struct Type { typedef Normal type; };
* A2 E- ^: m X, F, c; O};) x7 W8 W% J* P: z( S* o2 v+ x' q
7 ` z* h+ ^, A, Z) [. Q5 }
template <>1 Q$ m1 d/ ]9 ?. p/ Z2 y! N1 t8 K
struct SelectSpecialization<void>
4 Y% z8 g& L3 t0 E# i{$ p8 y/ p3 O6 D2 U/ \
template <class Normal, class Void>
0 p; |( W' t$ \4 |+ O6 J struct Type { typedef Void type; };
% y/ i2 R4 K; v; U};8 M N% w( n+ X
$ N* I5 |2 m5 r6 g, ]template <typename T>
) c) `* T F4 K' r4 zclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
d' ~* j i# j% ~ F% ~{( A/ m& ~" C& I+ ]
public:
) K( A- m7 |8 w% j9 W QFuture<T> start()
# q# P. v) w3 x+ l% G {9 {% y1 d s( i1 j# p
this->setRunnable(this);: L a! w, f; V& t d9 v5 d& X' G
this->reportStarted();. J& |; s7 d* ^( n
QFuture<T> future = this->future();) `$ V0 a4 n& S. G( @
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
# A8 B; G) w& }# ?" P9 {( { return future;7 j! G+ @+ \8 T% o& g! `
}
2 Z- }3 \; `$ G) y! H H* z
9 ?; k$ p4 C4 _3 R8 ]2 F: d+ c+ y void run() {}- {& }2 q7 j0 G( n' W# j
virtual void runFunctor() = 0;+ O* S. ^! E1 ? c( p5 m' }% f
};
- w& ]0 d/ Q0 Z6 [5 a* P$ L
1 {# Q+ @. p6 e& ptemplate <typename T>% _# U7 f* q' P; Z* i
class RunFunctionTask : public RunFunctionTaskBase<T>% v* q h! x1 B& W
{
; k1 |, A) z9 z; @) B2 spublic:2 S- h3 M' N. ]/ y' c: _% \* t% w
void run()
6 ~. t) m `: O7 k" c {# T, `) B0 L. g/ v6 |1 w* ` \
if (this->isCanceled()) {
2 P' s& ]8 T0 _( @( @5 r. Q this->reportFinished();7 w4 P( L2 w( r; N
return;
, z; L* L: r. [6 x( U1 B6 B }
6 D [) J/ n' x this->runFunctor();, t2 t/ j. x( H- u6 Q8 u
this->reportResult(result);4 P. x& F+ i3 B; t# b
this->reportFinished();
$ w0 o# m; B8 q6 _. m( z }
, w/ f. h+ }. q, l T result;1 h5 N2 Q2 b p9 r q9 @
};
/ d; n& i& M. c# F. r5 f" L( c% z
template <>& O8 s7 }. ~- M, l* M/ ^( |) ?
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
3 s% g4 u# b' ^& u{
/ i/ K+ C% w& U% V" Vpublic:( G- r) g* _9 i4 H& M8 a; `
void run()
/ d$ R: j7 ?% ` {7 N$ z1 }$ R4 C2 s, K9 H" V) O
if (this->isCanceled()) {
/ c: M; x# r& T0 J this->reportFinished();
4 r6 J# X, M- h3 ^, f% ? return;2 z) H% |; s+ l( f" I% h
}
- Q+ u1 M" q7 h/ f this->runFunctor();
3 P& f0 k7 ?& o# { this->reportFinished();9 k$ u4 D- Q1 G" ~3 u5 Y
}1 J$ g. c; d0 x, A. Z3 E- R, L
};$ l' A/ w; G5 y. Q% M
2 K3 c) F, L* K9 l6 o0 v
} //namespace QtConcurrent* ^' W/ }, S6 m! _: J- D' |
- A9 u3 C0 R! \# _
#endif //qdoc
$ G) p# w, o$ h2 T+ a! z0 m! m: H6 O6 l+ o8 f8 E# t$ y6 ~& x
QT_END_NAMESPACE
5 L q, l$ D9 u* d3 NQT_END_HEADER
+ \7 Z: u- W9 i6 Q. o [6 m3 `' N# Q& j# f5 d1 y+ V
#endif // QT_NO_CONCURRENT
# }. L' i/ u# Q6 b# Q# E$ l2 I
! r0 J3 ]1 T8 _; e' T2 o0 d# g#endif, B3 G& r0 `/ X, u# n9 [* ?
& Z3 z' {. R- ~2 i: E |
|