|
|
我对syslink进行交叉编译到arm,但是出现如下错误:' U( ]9 ^4 K9 u0 |
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
+ U9 Z5 x3 y8 ]4 X, b1 ]0 M. y; }3 t G0 s" z1 W
这个头文件内容如下:
$ _4 I9 H0 M5 ^+ y7 A% M- D% \4 M#ifndef QTCONCURRENT_RUNBASE_H! d9 T' n- c0 v' r U5 O
#define QTCONCURRENT_RUNBASE_H. e7 f: X) R2 t$ E9 d
, G5 w6 V3 @+ i* \3 d4 O#include <QtCore/qglobal.h>! q1 V3 J. p1 G' u+ y
3 R* u. H0 n* A, D#ifndef QT_NO_CONCURRENT
/ {9 @( u# b- n3 K N" p2 T. V) I9 g) ^. x
#include <QtCore/qfuture.h>" l( N1 W+ [2 I: c- s b8 |
#include <QtCore/qrunnable.h>
! Q" ~7 [% X3 y; l+ H0 t( @#include <QtCore/qthreadpool.h> y% s j5 X' R6 t1 @
3 i. o# K' l1 t6 C9 I$ C' { L/ eQT_BEGIN_HEADER" f8 P: G3 E$ D; P
QT_BEGIN_NAMESPACE
{9 U( E7 r. T! K6 F2 ^4 I. X4 }, F
QT_MODULE(Core)$ a1 \5 ]# }5 B) p. u
" N M$ ]( l- ~ z$ ]% f#ifndef qdoc
; s) J9 R2 k; G, p* g! ~# M3 J
$ V/ k) t1 z* x5 O6 m7 ]9 t; Cnamespace QtConcurrent {
5 h- w2 r# D2 E2 o
2 F$ Z1 X2 i6 o; }6 a( otemplate <typename T>
" }; N, R: E0 O" ~struct SelectSpecialization
$ J+ V$ _1 ?" V2 g# G{
# F" h* K2 C4 i template <class Normal, class Void>
) ?- ?/ _* h- \ struct Type { typedef Normal type; };
* a+ h9 L' Y% J( r' D' J};/ \' \5 Y/ I) V& U6 W, D8 ~, `
& Q( o' I* E W' ^9 B
template <>
4 K" o- I1 [. S5 ?: D: U c7 nstruct SelectSpecialization<void>
& b: B0 \, x4 a4 R1 z* N {{
% \& u$ o9 h" m) c template <class Normal, class Void>
6 \9 d, q) \2 V struct Type { typedef Void type; };# c& W4 }4 z6 K1 K$ G/ H. l0 e
};
5 U, y0 l# J; U" X" D+ u( O# O2 h( q2 N) [/ ?: w
template <typename T>& v, ?3 g* P- h/ W2 T( ]
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable5 `) J3 Y& E3 ~" G3 A
{
% T0 }+ B9 F6 x0 xpublic:
& l0 Y. {# b& i QFuture<T> start()8 i4 r* S% ^" [
{+ D2 F) V2 n4 O+ @0 ~( A! e$ g- C
this->setRunnable(this);
( `9 |% W! g" N) X4 x' P% l this->reportStarted();* e% `. a$ | T j8 F
QFuture<T> future = this->future();
' e, L( e$ k8 ]0 N QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
9 E4 a9 O- r' b6 ]: K: O) A* Y return future;1 e# B: u( |% |3 k o
}
/ b$ c; V/ V4 N
$ A- }6 T/ N# g8 X void run() {}( L* B9 ]1 P- W) ?
virtual void runFunctor() = 0;
6 X& k% e6 i: P: C5 C% B};/ ~$ H9 M& g+ h5 b% R' Z; H
# s$ l6 Y8 @) ntemplate <typename T>4 B% A g! U# l2 B) J' c
class RunFunctionTask : public RunFunctionTaskBase<T># @! a6 X4 t5 A+ j: ^1 q' e
{. ?6 f6 n$ }* C- d3 l) d
public:+ ^0 k0 R: x6 o% K% W
void run()
& Y2 b4 q8 }/ p: B: w$ k {
2 {# G; U3 N7 u" J1 t) i3 Q if (this->isCanceled()) {" b$ p8 P4 D7 V- s
this->reportFinished();
0 R# C$ Z( q" k2 c3 z return;1 _$ l8 }2 a) Y
} S; ^0 g6 A, D1 w1 q8 F; {9 [
this->runFunctor();
/ Y9 X/ c- m9 m& o% W& Y% [: Z) K/ P this->reportResult(result);1 K/ K' q5 r' G3 I3 W& h" X
this->reportFinished();
! g, E {% Q6 l& j }
, a7 b. \6 K/ r% I1 Q: s T result;
) q5 p* M E4 }};
0 n0 V5 }% [- v( n: Z) Z7 l0 r$ ^$ e& {2 F* e
template <>5 [8 `; A" @& \2 w8 a, V
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
) ], h- w% }3 K+ G/ u& L{, R9 _/ @! k' Q" W
public:8 D9 v! m) V. Y9 i
void run()0 H: H; }8 Y5 h( x {
{
# e6 |! N( z5 h6 {2 M6 m; [ if (this->isCanceled()) {
2 x) O+ G* U" @* l2 P' i this->reportFinished();
9 R, F; s( o1 i4 y. E" N/ E9 H return;
9 ^6 h0 |9 E+ a, }. p+ v; U }( N+ H9 w3 m& N& u
this->runFunctor();
; W: P+ [+ ?( A( l9 V$ G this->reportFinished();
+ O O3 k6 |# ?0 v5 G( N }
% x9 C2 W) V2 p) f5 y. G};
" C: v+ n) @( k3 f: W% ~3 j) Q, X8 D) Z) }' r
} //namespace QtConcurrent
% I& V( l9 v$ s- o) Q% R& p+ W! o4 s- j( ^3 W/ C
#endif //qdoc9 _+ ^5 ~" |; b- L5 C j5 {$ w/ V
1 [) e% A+ S" y3 p
QT_END_NAMESPACE
* n( T. [: [! A9 i1 nQT_END_HEADER
) G5 v- I2 I8 g- |9 B. f
8 {; L2 Z( y+ A2 |$ ^#endif // QT_NO_CONCURRENT
- g. @$ J( X" _ L4 b% |; `1 {
9 F6 D4 p' n' P- o! |) q- E#endif
4 k+ w* f& }* d1 o: M1 Y f. w" F5 ^1 v6 S3 D
|
|