|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
: a2 G0 Q2 Y; n3 [ t# M2 a/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
" e2 ~6 I5 n7 ?
, [7 _7 F( y9 U0 G4 R+ l这个头文件内容如下:4 k0 G8 V- f6 q) X7 y; I. y
#ifndef QTCONCURRENT_RUNBASE_H+ y# y( T5 n: T
#define QTCONCURRENT_RUNBASE_H. e0 W. r: r7 D, `" [1 j
; N; S5 ^+ b. m0 O1 [- g( b9 t6 L) N* d#include <QtCore/qglobal.h>, ~2 ^$ e: g, ^. O b
- i2 k( x9 i: _2 O. c1 i' V4 o
#ifndef QT_NO_CONCURRENT {2 k" K# H) j9 F1 U
. T# c/ Y5 j y" r, n6 l# f
#include <QtCore/qfuture.h>5 T% k* U# N! r% ?0 X5 [4 b2 g4 }1 a( C
#include <QtCore/qrunnable.h>
7 O) z* V3 R2 E/ W5 C$ V#include <QtCore/qthreadpool.h>9 L% ~7 c7 l( B& l
: B1 J {+ j7 X o& PQT_BEGIN_HEADER, c! d1 K3 e- E0 H
QT_BEGIN_NAMESPACE
4 W7 {! J! {# X
% K. z G) c1 C8 \9 }, t8 d VQT_MODULE(Core)
. F6 V7 h5 P$ \( O
( N8 ]) O; t( J, I- b# \6 V#ifndef qdoc/ B) ]# H" L% U# {, c9 z( l
6 F1 x7 H6 P0 D5 i8 n. W! n% Cnamespace QtConcurrent {
. ^: ]& D) B5 Q+ r) g$ q9 A2 z$ f& J* } ~1 H2 s/ y* @6 f
template <typename T>
8 R: i7 I \; Sstruct SelectSpecialization( c% _. L: Z. F5 a8 F) K
{5 ?% \. [2 t5 n4 ]
template <class Normal, class Void>
. H" v B2 u9 B( U$ C D( i9 a struct Type { typedef Normal type; }; a% c- `# C- l$ o; d( ?
};
2 h8 `: C+ l2 T( S/ z
/ \* ~ N. i3 q: h# e7 Ztemplate <>" @+ F3 l' F# B1 g$ S2 ] F
struct SelectSpecialization<void>
7 F4 ?0 d) a* H2 X W{- Z+ j; w/ V2 B
template <class Normal, class Void>
! ^: M I7 e$ I) i' k$ x o5 p, i struct Type { typedef Void type; };5 ]! e; y2 }7 s: [/ _& b* c
};
; [; F7 s+ ] c, W, x
2 b+ V' v( G4 E3 \template <typename T>9 F& o) v; V% Z- I* @ s; P' X' N
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable) S( J7 X, L. S( P9 ? A8 A6 T
{
9 j! P2 ~2 V" S2 I4 c2 fpublic:
1 w& P7 b; V6 C QFuture<T> start()* g* _) L* Y4 ^; U! z
{7 V1 V! X: h# y J) O2 `
this->setRunnable(this);
% Y: `% O& x% u9 E0 S this->reportStarted();
% K5 c6 |( c6 G3 V5 F0 U: G: V* t- g QFuture<T> future = this->future();# e& Z+ q& [* `0 S+ C$ P6 t" j
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);: O2 U- ]$ K! A5 D( ]' ]& w( {) H$ N
return future;/ t8 k* n' h8 R3 A# U
}
; J2 x) A1 \% @ a
! e. c% f/ \! y5 ~! S- P! y2 r0 s' a5 w void run() {}5 [3 b% ?( ^- G, w2 P4 q5 k0 x
virtual void runFunctor() = 0;& H- T ?; H; { z- e
};% a; Q; l9 C' R4 Y- }9 Z
0 F: M8 `! z! L4 qtemplate <typename T>
( @, z1 Z; l' m$ }- Q& A5 kclass RunFunctionTask : public RunFunctionTaskBase<T>$ H7 ?- D$ G- r
{
v; c7 t" s4 Z3 d5 tpublic:
4 n+ E' r6 d6 y" y# b" m4 K' G void run()
8 c) ?- Z7 k, e4 I) U" I {4 p) S7 V" ~% `# G/ F
if (this->isCanceled()) {
) h$ [0 I* J0 ]( E( ? this->reportFinished();) i% Z$ K5 l, c3 a) u1 c
return;+ |% j; g! `9 a2 c: m, }' B
}8 M- L- w9 Q5 c, x% s
this->runFunctor(); E& j4 ?! }: G" {1 h4 f3 K
this->reportResult(result);
" \8 v5 @% a2 Q7 f: f this->reportFinished();. _' n& |" Y3 o8 [
}
; b3 j" z" v5 |6 ^' }0 E) j! { T result;( j( v! P* h/ U1 c' [# Z
};
- U5 b9 B. s" d1 m. u2 o2 V! v7 n; [
template <>
* B0 C( |& p) o. cclass RunFunctionTask<void> : public RunFunctionTaskBase<void>+ {) g9 c2 O3 v+ g3 T4 {
{
# Y) K1 {' j, a2 k Zpublic:3 G8 V4 U, E% q6 w- V3 e
void run()" _; L5 E$ G0 a) j
{3 U7 U4 e8 ?$ r) D( \( R
if (this->isCanceled()) {
/ ^* ^7 f; s" r/ I) l( T9 a this->reportFinished();4 M9 l! \8 X$ d4 j& e* g7 w, E/ N
return;- {+ K6 ^1 z+ m$ x: u' g7 A) Y' V
}4 i) ^' V2 a3 C5 i
this->runFunctor();
3 o4 C2 Z9 c0 W" v; `/ U c6 v0 s this->reportFinished();) f3 U0 `$ n4 G
}
, k2 n5 L- O, D6 N, K$ v" j* t};( j* a y8 I: |+ K2 _3 V0 {! Y" Z- d0 e
$ M7 {/ h) e5 t0 E G9 X} //namespace QtConcurrent
0 t, g1 p& u8 M$ f- |$ k Y& `8 V- j3 w" f4 b4 J
#endif //qdoc
. @0 w" ?- K% z) [$ i' }2 N& u& L ?- c
0 b# C/ }+ k" ~ d' _7 OQT_END_NAMESPACE& ]3 `2 d2 ^3 z x# n+ g7 I; A/ M
QT_END_HEADER0 {6 o) b* b/ f. O' b% G
/ F( B! y& l: H; ^, ?1 u" l
#endif // QT_NO_CONCURRENT5 @7 _! n' e0 I9 c. k' |4 [
$ ~& b- W% f; v4 h
#endif
0 e3 E' n- f) }5 i9 o
2 g# n3 C* a& h0 I, P- w% j! O |
|