|
|
我对syslink进行交叉编译到arm,但是出现如下错误:8 i: ]4 \# y( a5 F$ c3 ]) G
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'( c& W* l; |; {' s
8 I4 N- x9 b' K( N$ z6 z! U
这个头文件内容如下:" S S; ^, x; W4 ]
#ifndef QTCONCURRENT_RUNBASE_H) b% x- J3 Y# i: c4 A% ~
#define QTCONCURRENT_RUNBASE_H" u% W$ i, e7 o. F7 W
. K. o7 I5 Z8 I: V#include <QtCore/qglobal.h>
: l3 d5 y# l4 r, {5 L+ K# ?
3 X9 }9 I0 |7 G' P; M# w+ ^/ Q#ifndef QT_NO_CONCURRENT: g$ i, h' g9 K2 a. }+ G# \; e4 Z
: F& {% @' g$ T/ h* R G#include <QtCore/qfuture.h>
- F2 |& s$ n" N2 i7 e5 }. b. U#include <QtCore/qrunnable.h>) G& E2 P `- i4 g' S5 E! z
#include <QtCore/qthreadpool.h>
8 Q9 M; E h+ v2 l8 u1 v t
( d ]! ]) b- ~, GQT_BEGIN_HEADER
; u6 q6 b9 N( ~ H+ W: R# }% o# MQT_BEGIN_NAMESPACE
& {: s3 b7 B; K: A' ]4 y% p$ A& W3 }5 ]3 _$ |4 Q L
QT_MODULE(Core)
! u: Y/ S. a9 S- E, p% l# x
! Y" K6 z* V% _0 q7 ~' c4 \) R#ifndef qdoc
! [3 z( e9 U) S7 B& U6 d. A: g- [7 x! q" N8 p, \
namespace QtConcurrent {
2 [$ R. [# ~9 y6 I5 L- B, A, j" E9 K, F2 c; Q
template <typename T>2 z' h- ?3 S$ v( i i) j3 W
struct SelectSpecialization, `$ v" |- ^6 e# C" a
{
1 V S% b2 z3 ~2 M template <class Normal, class Void>9 p9 {6 J3 L+ s1 D0 n
struct Type { typedef Normal type; };
6 h5 y0 G) A) L% y) ~( P8 h: I: S) ]3 h};
2 d% V0 r. E% i/ n, N2 T/ @* x% k* f- W* H4 Z# Y
template <>
1 X7 V" P6 F$ h. xstruct SelectSpecialization<void>
. w& H: c) |/ H7 V4 ?{
" s: F G9 J( R7 N2 | template <class Normal, class Void>
- M) o% {* T1 K, y" r* a struct Type { typedef Void type; };( q, U# ~3 e/ I6 Y$ P
};
! {; p) c5 q4 D+ f* Z) v' }
8 x# I) l9 I* ptemplate <typename T>" Q' s2 \7 L# x# J
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable) T. _5 M( b5 B; w# A) }
{+ w2 p1 W- u/ x- C
public:! o# _- h+ n8 J
QFuture<T> start()
# {5 h6 m* s5 p6 W {6 u8 S8 U# p. l4 H
this->setRunnable(this);
# \4 m+ S Q& z: Y: e this->reportStarted();
$ x; \6 S8 ?1 u3 L; a QFuture<T> future = this->future();
6 M8 i9 c+ G( b* a, x8 m5 f4 d' L QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
2 ^. X4 f, a3 U6 I return future;
J% \# e& T4 }$ O5 G7 r }9 N1 |8 o/ B L
* f% M8 m8 Y: y void run() {}. E6 j% D1 ~0 A# t7 U4 x
virtual void runFunctor() = 0;) N3 w$ ^+ L* `5 p: @1 Y6 U. q7 _
};
& a# Q1 ^4 w& c8 r9 h3 W6 g' Z$ {5 l- s4 u4 d$ ]6 G& k
template <typename T>- O9 |* C: S6 b. B) O
class RunFunctionTask : public RunFunctionTaskBase<T>
, x; S7 g& X+ c: p" W D0 `{/ u- w2 z3 ^ D/ M7 N0 Z$ b' [
public:3 v$ Y& N6 t* h. C" K/ g H
void run(); s. d2 t4 B% I% l- q9 H
{' }! G8 j3 d8 A! W
if (this->isCanceled()) {
+ H W6 m" G z this->reportFinished();
D- M( ?" p9 b, t( M8 G return;+ f- n$ w- O L
}& W- x7 {* s; e; e! ~
this->runFunctor();0 B2 e" g; q6 T; n& ^, C
this->reportResult(result);
; g, Q8 A' R$ `$ l4 V this->reportFinished();
: m; p5 M# Y2 _5 z! @* {3 s0 O }
1 k% U a% u$ c9 X j; }" i T result;
1 u9 H9 ~/ \; G) y+ b! c};
/ }5 Q( c2 X) }, X% f d2 Q. v& D0 H7 i% n! [6 b, F) `/ k) p
template <>) F" \0 z! a" M2 `& |" Y! m
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
1 ^ ~7 g0 J" L5 Q{: |0 P d9 W- W+ u1 X
public:
) y* X: E6 d) z1 g void run()
" H) Y6 w8 b+ g- I$ c% z4 B6 K {
5 C/ g! H1 b- a+ D& A3 a if (this->isCanceled()) {
: o# L" ?" O3 t# m8 v% R# @( V this->reportFinished();% T7 N2 ~4 s) E
return;
7 R8 x/ w: \$ d ^+ K$ a4 C0 L }3 f' {8 Q4 i) E' x
this->runFunctor();
q, y6 F7 Z" S4 `2 T$ D this->reportFinished();. k- j' _7 G1 R1 B% z
}
* }; ?$ F9 w+ A, ^- U( i: w};
7 ~# N3 ^, l# ]) v2 {0 `: G. C: e" T8 v. P
} //namespace QtConcurrent
% Q+ f: ^3 i+ a: f* {+ V/ }, A" ^* S7 w! X0 F7 B
#endif //qdoc2 g1 D7 z9 s# n- u+ U
. N2 u( _* z8 a5 }0 |' J
QT_END_NAMESPACE
2 s7 A& U: f# l5 q8 AQT_END_HEADER
+ E; H" ^" G4 m$ F1 S) P! v$ `; a( M! _. a4 R1 m. H
#endif // QT_NO_CONCURRENT8 k1 I' h4 Z* L
3 o6 T% y4 V5 z& U* D/ T#endif
" O% q8 A9 k8 J" j6 ]5 ]9 W2 `3 s1 O$ [, C
|
|