|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
( O$ g; i, z" y* Z4 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': ?1 l8 {6 [2 k. N2 L' c9 |
, H: U* K0 h4 n$ X' N0 m这个头文件内容如下:
' [7 Z( [# O3 v$ b+ O#ifndef QTCONCURRENT_RUNBASE_H
! g$ H$ X# G% ? w#define QTCONCURRENT_RUNBASE_H
7 z& c" G* m& c" t+ g7 X# O* D' [, v, \; A' x p! B- v
#include <QtCore/qglobal.h>3 B8 M$ m+ B/ y5 I4 g; f. |; l
2 I) l0 M F9 T2 C- {- {8 {
#ifndef QT_NO_CONCURRENT
( D5 T' f7 p! H; l1 C# C& Q2 g
?9 i$ m1 Z9 |* F. S#include <QtCore/qfuture.h>
" U* p- U7 I/ \/ a+ l& W: T" U#include <QtCore/qrunnable.h>
5 ?2 Y! m2 \8 }' M& b: i; J#include <QtCore/qthreadpool.h>: g5 Z9 ~1 c h8 k, G1 b8 [8 G
, r1 }+ W+ i2 P2 ?
QT_BEGIN_HEADER
8 f {8 r, K& n4 m! q9 A1 K9 {QT_BEGIN_NAMESPACE
* `, l! ]; _- _% M1 E# T5 q0 i# g3 n' Z9 l8 ~0 F
QT_MODULE(Core)
; c0 s- U2 l: [. \6 U8 }6 r3 Q; y9 s( \* \. n5 E
#ifndef qdoc
' P! l( h$ b/ p- `8 Z, \( _5 S" s0 V0 T4 Q% X: A* c9 g8 I) {4 ^% a
namespace QtConcurrent {0 g9 v- _; f5 _
, \4 r9 C2 M- d' J& a+ @+ k! c) k
template <typename T>
0 x+ R$ N; x# I; O1 T; cstruct SelectSpecialization* M% ]- M: R- {4 T
{ ]) w: ~/ I2 d
template <class Normal, class Void>
2 K6 ]4 C% I$ \ struct Type { typedef Normal type; };( ?. h$ [8 r/ \1 ^- v
};) \! i% ~& h f: v
9 L% A0 a: B6 ^$ R8 Ttemplate <>
2 s' S8 B2 c; L3 Mstruct SelectSpecialization<void>. T% J! X! c7 R4 w; U
{; Y( H% J7 Q2 H% s2 `4 S
template <class Normal, class Void>7 V; e) x$ P b3 ^6 S# R
struct Type { typedef Void type; };
8 r, P( [# F0 Y4 S+ N$ a};
- O$ {5 R. h# I2 S6 G. Y
3 H: k$ R4 O8 Y6 g$ r' }, N8 ?4 r utemplate <typename T>
0 x# y( s! d# P9 U H* t8 r+ Zclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
- ]3 ?' m i$ c2 m1 h/ d" b{6 \- {/ [/ b; C1 s, h2 g- @1 U
public:0 G2 g5 T' a* `0 D8 @
QFuture<T> start()) g" G& W7 M+ ^' X! s {$ @: R
{* ^" M7 x, k: Y; C# i
this->setRunnable(this);
5 |& w. c6 c, ? this->reportStarted();+ j2 ^5 m5 W$ x; R
QFuture<T> future = this->future();
3 q' }8 ^/ L; s2 T: V) h- |$ j# D QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);: N/ I* m1 w: U* E4 G2 g
return future;
: i+ }+ [- _4 s- A. }4 k }
# S7 [; c2 H- W9 J
, N3 v8 Y6 ^$ o# Q/ W6 J void run() {}2 p" V) r$ A, @. }% F0 U- w: y
virtual void runFunctor() = 0;( V3 @ l ^# o, N- M$ M# D4 ^: Y
};
+ M- q# S; \+ r2 z4 G
, V; Z! r/ y' a0 R) o) Ftemplate <typename T>
( {, L8 }7 z. }( r% jclass RunFunctionTask : public RunFunctionTaskBase<T>! G; F0 S$ m- t* V9 q/ I- w/ d
{
$ F& j- g- B1 e: M% @public:
. Z6 V+ \! P8 D) ? void run()
: X+ ?; l; W9 A s% d; f {6 `, U% R- ^! \9 n% X6 Z: p
if (this->isCanceled()) {
r4 m4 G/ f: C/ p, X this->reportFinished();* U8 M9 }7 P7 a
return;$ [4 P* F& K" ^: g5 L
}
2 [3 {7 z) [2 z) N- W this->runFunctor();
1 R6 `- }' J# l4 |+ @ this->reportResult(result);
& K' ?. S) \. a% j( }0 ~ this->reportFinished();
: l. ]" u- J$ T4 I }
; N& Q0 B! W. _: d2 I T result;. h* h& n! o2 u1 F' K7 F0 n/ A
};
, L+ T+ l: R) P) ]- Z h
5 d3 i0 x4 q: ~3 U" ?7 Y {template <>' }- d4 O- | n
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
0 D% o0 t7 v* k6 r2 h{
0 g7 l% C! u- `2 ^5 c- \public:
& O6 z$ S/ J7 \' T9 h0 l' `8 e; Y void run()
* Q" F1 A- b+ }/ M6 G: ^ {
# a. Q7 L4 m0 s3 c' X6 J if (this->isCanceled()) {9 T% `" k5 |; T
this->reportFinished();
. m/ o# b1 J! ?0 j return;, S1 d5 K; w8 y
}
' B+ o6 g* }* K$ q5 w this->runFunctor();4 a( ^* E+ K( U
this->reportFinished();
8 B: v$ k1 m- o% |6 R }
" L& ~: Y' v J8 X+ O( o};
5 ~" S. C* U4 o+ y4 Y2 ?3 S* A' c, o: I. C4 O
} //namespace QtConcurrent0 H) |: X. f( E: J3 C' L
3 m# V) |: ` s* b$ _#endif //qdoc, W( W" a& p% o4 L7 t, }4 @6 v
+ r6 y6 A6 o' c4 f: u+ X
QT_END_NAMESPACE6 N2 ]/ P3 ?; r0 k F6 D
QT_END_HEADER/ Z; h' E' e% }8 W4 n
7 t/ \7 T" P: _0 H [0 K
#endif // QT_NO_CONCURRENT
/ Z. k P% E* b) f& F: O1 x* R [/ ~0 t4 c0 w
#endif
5 i3 o9 j) Z0 f: @3 K( H
3 k) q- {5 J& A |
|