|
我对syslink进行交叉编译到arm,但是出现如下错误:9 R( U# C" s- |- Z0 O0 J
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
5 r5 g/ F9 [7 ]8 x* U* V+ x% N& i' m: Q' Q; w$ Z$ S
这个头文件内容如下:
5 p! J9 w; o, w, R$ F/ [! p% B#ifndef QTCONCURRENT_RUNBASE_H
3 S) G# Q; V. w; @#define QTCONCURRENT_RUNBASE_H
3 p1 b. X& C, }8 h% L' I2 |; f7 ^2 ~& B& C: t% g9 v5 C- `$ T" G
#include <QtCore/qglobal.h>' |4 G6 @; ]- i; ]! s% y! I0 C
7 g; ^7 N' Z1 j* T$ J9 t: d
#ifndef QT_NO_CONCURRENT" \) W* [" P1 _: D- O
' x' N' l L1 g: g$ n: I6 J#include <QtCore/qfuture.h>
* @9 p# l6 d/ H+ r4 I4 j, ?, @8 H#include <QtCore/qrunnable.h>
/ V# i9 z& i- i; O#include <QtCore/qthreadpool.h>' x! b6 G* _) w
4 y, o' _; o+ h3 \4 }/ a3 Z
QT_BEGIN_HEADER, d/ E* l( @) C. A6 Z- r
QT_BEGIN_NAMESPACE
" O/ c: B" b; p/ x5 V$ p- `: W$ L7 l1 t
QT_MODULE(Core)
0 C7 t+ a+ f- S! i) I4 v
8 J2 L, X2 Z. C( ?#ifndef qdoc
! L7 ?9 b; C' Z/ k4 j. E
) G/ y/ W% L: L; ~namespace QtConcurrent {2 o k! z @+ |$ O( [& @1 L' f
8 B: I, P" _+ |$ y0 R3 |: [, Dtemplate <typename T>9 a- Q6 O4 I. y2 [' d
struct SelectSpecialization
4 P! L7 z9 M' h4 t{
$ I( b! E1 I5 v template <class Normal, class Void>
8 }/ b- k/ B7 ]& o0 ? struct Type { typedef Normal type; };6 c2 z0 r5 q: u! {( K! [: |$ h
};4 {+ H% ^+ f# D. Z
4 ^$ N8 i4 ] _1 z6 itemplate <> U# T2 Y3 ~: m; f: H! M4 l
struct SelectSpecialization<void>' Y% S/ c. p+ j/ @) t, Y
{
, G- `1 K. H2 S( W R template <class Normal, class Void>
( Z, |# D* f2 n/ A struct Type { typedef Void type; };' D J9 _' f9 e: n9 L& J
};
! K& k4 i. A9 Z; X7 R7 n! G# T
2 P& \' f+ W+ z8 Otemplate <typename T>& c' q" ]# n- G D1 b4 e
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable5 \; L3 X4 s. q! c3 T, t5 f4 z8 G
{5 g$ N' j3 Q& D$ b4 u9 R
public: D' c( W* }. K3 \# C
QFuture<T> start()& V. f e* G( c
{0 k( n0 O+ l5 T. o
this->setRunnable(this);
) q7 x9 T' Y9 ~% J0 @9 K# d this->reportStarted();
+ S! [3 l0 ]5 x+ m9 b& m QFuture<T> future = this->future();
! C+ _ x6 ]' L. Y- ] QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);7 ?3 {: L0 ]$ P
return future; M2 d& c# M8 g( X, U" Q' m
}5 K+ I; p. t: \. ^
! f8 H; Y ]6 O( i$ m/ d' S
void run() {}
% C6 r" C7 K& P! U$ y virtual void runFunctor() = 0;
$ j2 v7 G% ?. ^; S* a. W O};6 v1 {% Z2 l4 @2 ^
* U: ~: Z) R- dtemplate <typename T>( s' r5 [) {# w
class RunFunctionTask : public RunFunctionTaskBase<T>6 \% ~* E. @- _
{+ o8 T" U5 ]7 h. m- Q3 ]* b
public:
- \6 A6 e! ^4 {. c' c9 A3 q void run()
2 @1 C2 K" d1 z3 c; m, k8 Z! F {
, f1 @3 l1 G% J if (this->isCanceled()) {
- h. q5 Y! K& M+ j* ^) L4 I this->reportFinished();
5 t5 A+ M* f( M- i& D5 ?# @ return;
& ^% |& a& g- h J8 c. T }; w' N2 H2 [' ?# l% a
this->runFunctor();/ b( p: U" n9 g
this->reportResult(result);
P8 `# E9 t; h Z! o this->reportFinished();- [4 y/ F2 v, t) a/ q
}
& Q$ x5 [4 E; m T result;
4 p* u; N4 Q5 [: c V};# f% V* l: `6 H
' g" ], m" `8 q: T$ G1 O8 atemplate <> y# G& Y+ T9 v+ k0 s8 K7 Q0 R
class RunFunctionTask<void> : public RunFunctionTaskBase<void>5 s0 i" [7 ?0 O9 O n
{
9 k0 N) s6 }. mpublic:# [6 w! i! F0 v$ w2 W0 ^7 V
void run()
* x3 W+ c6 e! w* ^3 C! o/ T {8 |% [3 ^/ t& U0 P# f# ^- j
if (this->isCanceled()) {
* Q8 q9 i% `, X) a this->reportFinished();
/ ^% v# E, k: L5 m return;( d# [9 H9 K/ `; {% r: B
}
/ U1 v% r/ ~! U0 v& V* g this->runFunctor();
2 T0 N$ G9 {- m7 z' H( u- U8 P this->reportFinished();9 N+ ?1 ^- s; s4 u* Y; b
}! l: J' ?; G# r! p
};- W m8 x H4 y% Y
5 |7 O7 k' E$ M' T& \
} //namespace QtConcurrent2 n' w: {1 K. j8 `, H, N6 j3 |
$ i! j& ?* U/ o+ S J
#endif //qdoc" C# @- R4 Q2 C" R: o* G5 V" d
7 `: Q& O2 {' r5 s5 K7 y
QT_END_NAMESPACE
7 N. u, t/ z- O$ [' b5 l5 a) k8 aQT_END_HEADER
# h* \+ \. e( {/ j4 N
! o6 `2 S; q0 c6 Y9 l# Z#endif // QT_NO_CONCURRENT5 v* }+ l; N+ ~8 V; t# k9 G
Y n& j. z. N
#endif
: B" w/ F' s' q
- s# Y B" X% \* x* ~ |
|