|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
! L8 r, w3 A( n% `) Z0 Y7 }/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'- J3 U* u1 A& h2 J* W. N1 g- R) {
1 o- R1 z7 D2 T5 f: i) T这个头文件内容如下:4 t7 W1 g+ g$ j/ x& p7 V& T
#ifndef QTCONCURRENT_RUNBASE_H
7 ^+ }9 K5 p) v R! Z6 Z#define QTCONCURRENT_RUNBASE_H
# M8 i/ Q* N( C# \6 ^# ~
' i5 ?. J+ q, z#include <QtCore/qglobal.h>' \9 i+ `4 I% s2 F$ Z- _6 W( H
7 q' k/ |4 I v, Q4 d8 P
#ifndef QT_NO_CONCURRENT: x5 Q7 l, \" S/ J' Z( } L
. o+ M$ K7 p, f1 {#include <QtCore/qfuture.h>
/ P# b J6 U4 W/ t#include <QtCore/qrunnable.h>
" {! N! ?4 X2 ~, _3 _2 d#include <QtCore/qthreadpool.h>
; g) o/ ]4 d' b$ H0 j Q4 P! b
0 W- P. N3 e: ?5 j6 cQT_BEGIN_HEADER
7 y" A2 `; e# o, {1 `QT_BEGIN_NAMESPACE8 ]* [( m: V$ F ^
$ o0 t3 } V' AQT_MODULE(Core)
( [% p1 M2 \7 l3 x) |
. H; H& @! m, z3 Q8 I0 m#ifndef qdoc8 {/ P6 w, D( L# d$ P% K
1 z6 c5 Z, S) _- qnamespace QtConcurrent {
4 v. `' v# L/ Q9 b
. z# U1 S- Y5 N' m; }: V# } p2 w4 ktemplate <typename T>; f; {- F4 j; d% d4 s( P7 N
struct SelectSpecialization
" O0 r- K2 ~% n6 Z& }{& R& @+ B$ i' X! K3 o) ^
template <class Normal, class Void>
, @5 }8 r3 v* T4 e' `8 ?' }( c9 ? struct Type { typedef Normal type; };
# t0 |, k9 `: g6 X. t& y};8 U! d6 A& z7 ?, u: {# ^
' b7 ?9 p! a0 |/ s; etemplate <>& |; }" g# ` d, ]* Z
struct SelectSpecialization<void>
7 V% V5 j+ ]( K! F5 C8 i{
( ^, S G$ [% B z8 G/ L8 ^) w template <class Normal, class Void>' ^0 Y0 Y- d( E2 l6 V! L- j* Z3 {/ h
struct Type { typedef Void type; };8 {, H- l* Z- ? g; {% q: G
};0 K+ T' r) l3 s; h7 d2 k2 a3 d
+ H$ j1 U; d* f utemplate <typename T>
0 `! P! q5 w8 x+ D s2 _0 y' N, [class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable" W3 A6 l; {! S9 u& X
{' S$ d( V/ ^: ^6 p( n
public:
2 P/ j1 W6 q+ A- S2 e, K$ x QFuture<T> start()
4 i' p" y) r, x; m- b2 M {. d6 m1 C" \2 M: S5 k/ g0 |4 s
this->setRunnable(this);$ K V: n9 ~' J) D% f4 o
this->reportStarted();
/ U& t9 b, X7 G* O$ c( y QFuture<T> future = this->future();
# N5 p, b- C _" Q) J8 s QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
" m1 f( b' j2 P1 {+ e+ | return future;. `, {% ~" } Y9 I! y
}
" `0 I) O5 g. K4 t
2 M- a$ q! w" `5 U4 d. y/ g4 | void run() {}5 C1 I% L6 S/ w( P7 u" G, E6 S! p/ e
virtual void runFunctor() = 0;1 l% B3 G m: X0 X* Y& l) q
};! |$ N1 ^4 p3 c$ r2 X" r
0 x5 h: w( B" v9 k0 U
template <typename T>
9 G, R: y+ v% B( s- T. yclass RunFunctionTask : public RunFunctionTaskBase<T>8 s O- c$ O6 D: `/ C, d5 i# p6 R6 j
{
" g/ G. z( X+ `9 x. Cpublic:$ U3 z h. w2 B" Y. R" C
void run()
; F. r0 m7 o5 w- @- G# f {
3 L1 l5 _0 h, V2 Y( {7 e if (this->isCanceled()) {
& U4 |3 w0 O+ J2 ?6 ` }6 B! ?8 M this->reportFinished();
- c( N* u9 t" c return;% l3 c+ N( y9 v' I
}$ ^" W, n5 l/ `( F9 w3 z+ h- i
this->runFunctor();& N/ C% Y1 N8 s" }2 Q6 D! @
this->reportResult(result);
! v6 A8 X& ]8 W) w8 @! o' g2 M this->reportFinished();
. w$ A* @8 ~4 B; V/ n6 k9 L }9 [! u& B3 _/ a) c U# z+ S
T result;
2 b- o. M1 u/ c7 w7 f8 T( Q};2 Z I4 h8 O6 X3 q+ M6 ]7 M! B
5 O' p5 ^6 n$ Y5 W6 h, o& \template <>0 ?: x8 b( U' ^
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
H& }- \% V% V5 i. d1 o7 Q{7 x! G8 B1 m; S! Y
public:
T8 o! g M" Q7 O+ K void run()+ K+ l& x! C' R2 j
{
. Q6 u9 c7 l0 ?8 o/ X" H* v8 q. @ if (this->isCanceled()) {# T8 `% f9 r8 C1 n! j
this->reportFinished();
2 U7 F ~1 o3 U( j* F% b( ? return;; e8 f# P9 c) H: W4 Q) |' |8 k9 {
}
/ I0 P, I0 U. {1 l this->runFunctor();
- {5 V% h8 _2 N! j, |3 S this->reportFinished();+ N I _% U+ ^2 R3 O: j; K5 H5 t! j
}+ f/ l3 I# ]0 n8 N& f
};0 Z; B: Z e% V
C6 ?" ~) v' d! G} //namespace QtConcurrent& h1 d0 _" Q7 R; a6 y4 m+ V
: y( o( E5 ~ [& Q; _1 q#endif //qdoc
+ _% F7 e% ~* n& A
) B+ ?, c$ C' H" K+ J, N- oQT_END_NAMESPACE
* l1 `$ `+ r9 a! [8 M/ w2 @3 O! lQT_END_HEADER0 D2 h' L! Z B2 l/ b
' g, {5 Y/ E/ F1 `9 p#endif // QT_NO_CONCURRENT
7 W6 A) i' r( D; g
% j2 R* X3 q) F3 X v#endif
9 t3 t: O" r/ j; {! A+ h/ p* k. ~6 O/ G7 m P4 r* P) j: ]
|
|