|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
# O0 T/ h3 G7 ^; ^( t/ x0 @/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'% M4 s% P' ^4 |8 d; N3 s4 E) ` e
. K+ f/ b- `! ~) C2 o! K
这个头文件内容如下:
% H5 U6 |/ S' x3 z- n+ G#ifndef QTCONCURRENT_RUNBASE_H( w( ~0 b% C N6 Y7 M7 T
#define QTCONCURRENT_RUNBASE_H
, M. e1 `: [5 o4 K" a4 L' d
1 ^; n- Y* Q' R- L5 x#include <QtCore/qglobal.h>" n% ]+ p/ u. d1 Z3 E
) B8 t8 U, n) N! J0 T; v3 W# h#ifndef QT_NO_CONCURRENT
, u) D8 Z1 L" P& W
3 W+ S3 v% U5 J6 Q8 g. O: T#include <QtCore/qfuture.h>/ q8 X t$ d K- W! c5 a- v
#include <QtCore/qrunnable.h>) J ^1 V& j5 q; C. L- |
#include <QtCore/qthreadpool.h>% [. \8 X/ G: V7 e: e
/ ^7 B0 m' W0 x+ `6 t6 FQT_BEGIN_HEADER4 C4 M& m- `' }+ W# C" P/ |6 N
QT_BEGIN_NAMESPACE% T. F8 D: H4 B( \0 U. y: U. Z
( T9 ]* H; a2 {! |2 }: v
QT_MODULE(Core), z i# {' {* D$ H; `
5 b9 e2 O5 p1 t) o1 N#ifndef qdoc1 [' ]% `' L* u2 s2 |& @
9 s2 I* G$ V- ]
namespace QtConcurrent {
, f" V7 T9 W2 J8 i& m9 R% J- |) z. R; F; s1 ^
template <typename T>
+ i Y4 ~: J" Y# A" Dstruct SelectSpecialization7 T H |* X3 t5 v
{1 t h8 @. D x. p
template <class Normal, class Void>9 g1 k2 o0 `4 F1 F6 }4 U: e
struct Type { typedef Normal type; };
" ~! ~/ z) [' f% Z$ a};; U( |! d- J+ p) k
3 o: ?2 R. k9 N; D3 n6 Btemplate <>* v/ p* V& o! K- @5 U
struct SelectSpecialization<void>; G4 ^0 Y1 s# l: o2 ^* y
{4 @3 P' T# u8 b" j
template <class Normal, class Void>6 O1 l& Y/ V6 Q
struct Type { typedef Void type; };& t* Y( p3 I4 t6 o" v' x0 c; M2 B
};
}: a2 D [0 \# M: h" h& |; D1 T( {% E6 P9 W
template <typename T>/ a" F4 y' t3 d) \6 v
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable- C; e+ L H+ Q, o9 a2 t+ }, `
{5 G2 D3 K1 }* h2 I6 p" E
public:; r8 g9 ?; n# _$ U3 x
QFuture<T> start()
. S0 Y- ?3 F7 }- `. g& y6 k {
! w1 [; ^* e# S, e D6 ? this->setRunnable(this);* j2 o9 j8 P" j3 S4 ^1 F! i* G' A+ U
this->reportStarted();
' S, W8 A8 r6 ]7 V QFuture<T> future = this->future();
5 ?1 G1 P& m9 e QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);, Q6 U p* c4 x6 Q x# I( u
return future;
' b$ e; i! e3 _ }
; ^+ C* f( K7 \ b# j2 m+ O7 j! e1 V/ H3 n
void run() {}
$ s8 v- u4 ]7 { virtual void runFunctor() = 0;4 K% N$ w. I* l0 Z6 i
};+ ` W. Y( ]; Z2 r/ b
& `. E$ b* v; o
template <typename T>
- A# u9 f4 K% D R3 \+ W8 l3 J5 D0 zclass RunFunctionTask : public RunFunctionTaskBase<T>+ @8 `: K3 P/ z: z
{
6 ]7 ~ S) T |public:& k! k( S1 H/ e& m7 Z! Q
void run()
' Y0 Z. N" |5 j {0 j$ @! T1 M; \8 c! H1 x
if (this->isCanceled()) {% Y" a) I' }/ v5 m% K
this->reportFinished();0 u! v/ g, p. a. n Y. t
return;
. {8 M; e; Q! g6 G8 ` }- J) V2 N" Y8 m& ~
this->runFunctor();+ O- r( J$ V5 \1 k$ r: B
this->reportResult(result);* ~ Y/ e$ u5 l) i# a b1 ]
this->reportFinished();; a) m z$ s' _
}/ d! R$ Z+ r* r4 V5 N& P
T result;6 G4 i) V) J7 x, v5 e; y, R4 c
};) A1 S! v8 o. R& i9 e7 W: l" u
) e! _. `9 t! ^8 l5 \
template <>
8 p' u/ I% C$ g7 Gclass RunFunctionTask<void> : public RunFunctionTaskBase<void>
; T4 l, h2 k4 G5 }: a3 r{; K: d' i* r6 `; X& l0 C) Z
public:
6 ^; }2 j% M! B' P& T2 L void run()8 g' [9 A# s' W% G9 w
{
. S" n" D+ [5 I5 l6 o6 ?& U) J if (this->isCanceled()) {
) z7 \# J0 A: g/ o this->reportFinished();3 s* w; ^6 v5 w# K* d: l# o
return;
6 I/ t* q* N; q1 I }! ]) D9 l( R t- l7 L$ V8 M
this->runFunctor();
$ y/ J8 p) d3 g3 q7 @! ~7 _5 A this->reportFinished();
]+ f/ V1 V$ i5 V }
$ e! p$ P% W0 J, p% u6 n};
6 v) J& g) Z) H6 r _1 F/ H# p, f) g
: l. k% S. \# O5 G} //namespace QtConcurrent' I. L2 t1 A7 ?
+ w8 U) d6 L/ R' d3 w( J) U#endif //qdoc
! f$ M; p; u$ y3 B2 R
" O8 N4 E$ C5 c2 }' _QT_END_NAMESPACE5 ~8 @0 a8 [$ c7 S4 L4 R# I0 S
QT_END_HEADER
& z- U/ B9 E8 p4 c- y. l. }7 z" j: b* y+ `
#endif // QT_NO_CONCURRENT% x9 ]% I! b$ t w. j
' o/ d) Q0 w' A& A/ K t2 k' W) L
#endif. Z& l+ h: |4 b8 k0 L; i, {
8 o! ]6 L( {$ C1 ^4 D
|
|