|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
1 S/ n5 I5 e0 {, F; v/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 ?5 o8 q% ?) h0 `5 Q' e4 w. Y7 V3 }9 t$ ^
这个头文件内容如下:
% @! m6 \& {7 t: m#ifndef QTCONCURRENT_RUNBASE_H. J$ f: t) X, }) x
#define QTCONCURRENT_RUNBASE_H* I% G/ @" _7 w P1 m; h: @2 \3 E
- e l3 [. f! ~! \3 ^#include <QtCore/qglobal.h>
. w2 ?7 r G7 q7 H7 a6 }8 d3 h# l. o' X0 v9 d
#ifndef QT_NO_CONCURRENT. i! @% Q4 j7 N, \
}5 V* ^8 c3 K% r* v
#include <QtCore/qfuture.h>- X; C% Y( j- r0 ^. k" X
#include <QtCore/qrunnable.h>
0 v$ f1 b3 i" d% R( T1 C#include <QtCore/qthreadpool.h>; a& B, \; g/ p6 s* I+ T& z: J
6 K C" f7 i* H" r8 `) ZQT_BEGIN_HEADER7 i9 r( K7 A1 C- j, w
QT_BEGIN_NAMESPACE
' q6 n& T, ^ w3 n2 m# ^% m9 G0 E, V3 }/ T8 u4 M
QT_MODULE(Core)6 d) Q! O. i0 x: ?
' i$ X' K' C( q/ p4 h
#ifndef qdoc+ ]2 I8 k' R, {4 P- [1 O: \- P9 E
. g! b- q4 G7 B8 N a2 |namespace QtConcurrent {) S- T: H6 g p& G/ z
1 g, A" v4 a0 \1 D9 G! s* }1 Qtemplate <typename T>4 ^$ F) J1 _1 W: D2 R
struct SelectSpecialization3 X$ O" r1 C+ p# c
{, O! \8 N1 u0 B' H
template <class Normal, class Void>
! y2 N& Y5 S+ i$ n: N struct Type { typedef Normal type; };' x$ q& e {) @5 ?
};" Z5 c7 Z4 Z- r- N% ~5 w8 H
* G1 Q9 w3 q3 U+ s5 o& ~
template <>. O& i& @7 a0 @/ g1 G6 E2 H
struct SelectSpecialization<void>
% V) ?" `1 X6 R0 J+ k( T{. S" y' w! T% E+ j; _: S# F
template <class Normal, class Void>
, }( r* S" e a$ A struct Type { typedef Void type; };9 U; r- f, i3 V/ {* r8 H: K
};/ ]6 j: s. g' R8 W( h+ B
7 W. f. d! o" @' h/ dtemplate <typename T>' h9 ?8 y5 a; a5 ]8 |
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable. X: R" I) O1 O+ L/ n1 b* {9 n
{5 ]) _' H T. X1 E" l$ A
public:
# E G# t* G0 t9 J QFuture<T> start() K0 Z8 S1 t8 q! I# U7 W+ U' d
{
) a8 d! j: U" P1 P/ o- ~& [ this->setRunnable(this);
; ~5 _* `. A e9 N# w this->reportStarted();
1 e# L; h1 P0 o, w2 |5 n5 [ QFuture<T> future = this->future();
3 _; L* X I: Z) }/ K, o& W& k! Z QThreadPool::globalInstance()->start(this, /*m_priority*/ 0); s( ~) G. J# [) B) f( g
return future;
3 ~* o' ~7 N: D" B9 t: M' l* E9 q }# ~* j1 i: y7 E! t9 C
. A) ~3 q8 f) P) U! \4 [, d
void run() {}
6 U3 J# `& x/ h* { virtual void runFunctor() = 0;
3 A Z3 A9 Z/ v$ _' ?};( }5 S3 \4 f6 b1 F1 e2 C
& g/ g+ A! a$ [0 R, P k8 Ktemplate <typename T>
# n: C# E- H& T( x+ Z; _& nclass RunFunctionTask : public RunFunctionTaskBase<T>
3 J, b" {* W ^( d$ Z9 ~/ M! `{
3 s3 O# r, ~/ n; L; ]! @public:
5 P$ }9 F9 G( d# w1 H void run()
5 n8 O! T3 L2 o7 Q" l {% O$ d2 j9 h& X" y6 H0 X
if (this->isCanceled()) {
7 u0 ^6 |/ [3 |' m: } this->reportFinished();
: D' Z7 T( s; A& _3 J# { return;, _. M0 q. H! s! g# y' O6 A: J, n% Y
}+ ~- }/ P$ G& o- l7 S, G
this->runFunctor();& \/ @2 m, L% P/ K; i9 c( s
this->reportResult(result);
5 _3 F$ s4 j' ]% {; M9 O this->reportFinished();
" N2 C' t4 S" E0 N5 u: ?! { }& \" s( ^. c. ?3 Q+ H) N" W! q8 e
T result;2 H2 `+ F; @: V% @0 j+ v
};2 z4 f0 g3 a: O) c" J4 D7 `; _
% w( b9 ^7 n7 q: D1 c2 Mtemplate <>$ R& r/ V) s) C, F' E
class RunFunctionTask<void> : public RunFunctionTaskBase<void> u' @( ]! ?( h+ M- R/ ~
{/ u5 }3 x3 ?1 o# e! a$ ?, X' q
public:
+ n0 w5 i$ b0 Q& D& `9 X( C: r8 N void run()5 j) h/ x# I9 Z- R0 r4 v& x# v
{
% o0 o: R$ A. o& S! `/ s if (this->isCanceled()) {
$ M1 K! v# A ~% y9 z this->reportFinished();2 p, u9 W, j4 e
return;
/ [0 p8 J { ~3 Y; o }
8 _8 V( v7 G: i, D4 D! u8 u3 A this->runFunctor();. D* A6 q! K: R9 F
this->reportFinished();. R/ O/ D) H+ }' q" q$ T
}5 [; Z1 G, e; ~4 M7 ^
};
) q; M9 u0 S/ F
5 i" R, R2 N1 Y+ Z6 g+ l7 B: Z} //namespace QtConcurrent& R3 o! }1 G9 e" M4 @: s
4 X f( L, I7 ~2 R, c: O1 c
#endif //qdoc
: N& K% x9 X5 f/ E% t* [( e- E5 Q4 E* V9 `6 A# Z
QT_END_NAMESPACE% A5 a) S& \' n+ Q7 e/ B+ h# D/ X
QT_END_HEADER
4 ?& x* g/ H* O, |0 T: U) f: P; R# N% G- Y
#endif // QT_NO_CONCURRENT$ D3 r0 m+ c4 [5 v6 {' F
; d8 x& U2 E e8 m+ Q
#endif$ k. h, h" K( v$ D8 D Z6 r
- J$ r" N N0 ] |
|