|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
+ ~4 V8 n9 f! E6 e$ s' k/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
2 y% o: s% d* w" K, g
b9 M* g; h$ _8 _& _4 {这个头文件内容如下:! z3 j* G( A: K& W! A
#ifndef QTCONCURRENT_RUNBASE_H3 b+ v( E" Z/ O5 n& O% n
#define QTCONCURRENT_RUNBASE_H
! v! i6 \4 x/ [, ]$ X' c# U% L S& h' i
#include <QtCore/qglobal.h>
" i4 ^2 f5 y- L8 v6 C6 u$ d; h* e5 P; h) {
#ifndef QT_NO_CONCURRENT
% ? E. T! _# t1 e) w- k
; g" S1 R8 l" q [5 r% d5 L6 P! d#include <QtCore/qfuture.h>- Z. s% r6 z+ l; D) h0 k" I
#include <QtCore/qrunnable.h>" L$ T8 t. b; L; ^& d
#include <QtCore/qthreadpool.h>
@! x3 \. W' c' J4 ?1 i" G+ t/ `$ [8 c1 i0 ^& y, H' Q4 r
QT_BEGIN_HEADER0 ` q( o3 g: b: p0 _
QT_BEGIN_NAMESPACE5 o$ b/ w. ?/ `* c/ a
1 _3 ~; m! j2 l2 _! jQT_MODULE(Core): e# d9 R" b) w- Z5 T4 c j: V0 ~
0 [9 S& f& a$ V; K#ifndef qdoc& O% a8 ?# @8 S! _- i7 d2 |5 h
0 ?6 a P8 y5 onamespace QtConcurrent {
' H. }; i! ?2 }: ^- d
6 G& i1 }* \: O+ Jtemplate <typename T>+ B b$ F( _5 Q- }% z0 h6 F
struct SelectSpecialization' G* i' V" s! k4 W8 B: K( B! i
{$ f9 v4 ^# j [/ d; _$ H5 o6 |
template <class Normal, class Void>
: l. H$ i! l! _# O3 [ struct Type { typedef Normal type; };
; @8 S7 Q: k& l6 ]7 Z};
8 a* ?" ^# }2 ~$ `
- u2 K j) E6 s2 u% htemplate <>( n# c) ~2 S6 x* G8 _
struct SelectSpecialization<void>
! R/ n; |2 s/ A6 h4 o{
% q3 x" ^! I* w. v; T$ i; m template <class Normal, class Void>/ s- w! g G* |8 ?6 Y5 R
struct Type { typedef Void type; };3 v4 C- T/ J1 {" E! Q k- O! d' {! A
};
. g' }7 f1 ?% K9 T2 {8 L; w$ Y- ]7 d; q7 W2 ?9 s
template <typename T>
: O( f) {: G9 j$ A. X wclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
P k( T3 N% D$ X% C; R* {7 n{
: i1 C& x7 w! Q' r7 H9 Cpublic:* s# K, E6 d! c5 w- e: a; y
QFuture<T> start()
2 @' P. S# m: F* G1 @ g$ v: o. ]) H {+ }3 M: T) k# T
this->setRunnable(this);
# H" e; K# _% A this->reportStarted();5 f/ Q5 O' N$ j+ ]( D4 [! e0 K
QFuture<T> future = this->future();
7 S3 e+ H {. v" ]+ } QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);" \8 `* Y( h0 U) r4 \5 Y
return future;* l; H/ K& ^) c
}
0 P" u! t" ?' X, B2 k
S. U' d9 S% S2 ] void run() {}
' C Q/ ^7 }0 c4 W, r- @$ G virtual void runFunctor() = 0;
: H" s+ H& e o};
) a/ i9 M- C7 h
0 @& y3 [/ G( s1 R# qtemplate <typename T>
, n! I8 z; @( g% {$ ]4 Q% Jclass RunFunctionTask : public RunFunctionTaskBase<T> m) Y8 S7 t" |. h
{, J5 c+ L1 T0 J
public:6 n: C& M2 H; v
void run()# `, {2 ?8 {. F& C
{" o2 ]3 _6 D Q: n6 x5 N" q9 h
if (this->isCanceled()) {5 g" W8 @/ r3 d6 v) M2 u3 H) x: t0 l
this->reportFinished();
6 N+ F+ {: N9 a& Z4 \' p1 ` return;. @% g. k. J! a9 D! c/ `3 N* f8 T& _9 Y
}1 e0 C( R. x9 V2 d+ \( k
this->runFunctor();
5 F. P4 p1 K$ A6 h this->reportResult(result);
* d6 y5 t1 o" ^1 `2 s this->reportFinished();
8 }* i _( {/ B% f3 M8 S* c" ? }
+ }0 m: o# S2 [+ ?" Q+ d T result;
$ j" z$ Z4 v$ l- I! }8 U2 t};
! _ u, M4 S( r# P) x6 n2 g7 T, w s( l# r |* J" \
template <>; w* _! t* n% O: t& q9 u' x
class RunFunctionTask<void> : public RunFunctionTaskBase<void>4 k4 i: C8 K7 v2 `1 i; r
{/ l. _* ~" x" D, c
public: ]9 m0 h, a' X; s" Y& u
void run()! E4 [0 ~3 p9 N/ z# l
{
* g* S4 F0 @, C* z if (this->isCanceled()) {' q6 I$ ?. `! ^
this->reportFinished();
8 l/ m) d z0 [( R0 i% ? return;
7 Q! A8 P4 _! T6 u ` }; Z( C& Z% i- @( a& q
this->runFunctor();
8 ?9 T2 v( _& x7 o: Z5 t( L" K this->reportFinished();
9 H' @4 W3 v9 a }
- ~; R/ W+ j- Z- x5 I1 Q6 l};- Z2 m. b- @( s) W# D
1 E1 t9 |1 s& y& ]; ~
} //namespace QtConcurrent
* J6 K5 W# j/ k# B9 w5 @; T9 d3 d7 v9 k
#endif //qdoc! N# c1 N) N' M( @- V) y& }/ R4 E
2 x8 ~: \/ Y$ F( d0 bQT_END_NAMESPACE
1 R, M2 M& O; v' p; }% nQT_END_HEADER& K$ t7 F S& S1 s i
" T0 i4 [5 M& Y J#endif // QT_NO_CONCURRENT1 C9 h' o' F, N8 r: l7 p
9 f7 o- l$ z: k, U
#endif% N+ W( y0 @' G* {' k x
& @7 G7 ?# `0 b, y2 z |
|