|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
" \: ?1 \9 d. N+ C- h& I/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'3 V. e* M C3 H6 n7 v6 Y7 o
" h: c, @) ?8 S, Z/ ?! Q1 n ^
这个头文件内容如下:* y. E A5 `3 z' u6 o3 R' J5 M3 C
#ifndef QTCONCURRENT_RUNBASE_H
! U8 F! F" n# Y! i( {% G' {$ _- j#define QTCONCURRENT_RUNBASE_H% t! X; v. m& w7 [* `
+ E2 L( d- O2 T' n% z#include <QtCore/qglobal.h>
* ~- P; F. H, Y( i, {- M1 F
# e0 @4 A* }2 F0 l#ifndef QT_NO_CONCURRENT
- j& H* ]. s: Y% b/ o0 T; \2 ^6 z3 {8 Z4 d& w9 }
#include <QtCore/qfuture.h>) ?) ]' p$ {3 {! p
#include <QtCore/qrunnable.h>' Z* K! F5 d2 T
#include <QtCore/qthreadpool.h>7 ^& [# Z5 Z! ^ F" m5 j
) U: m3 C& G3 D3 O( wQT_BEGIN_HEADER [/ g b6 t$ E& V+ e
QT_BEGIN_NAMESPACE
/ Q6 m6 C; |6 e# `1 u- o9 n. t& X# u, T
QT_MODULE(Core); ^1 F. @, b1 N4 w! l8 c
- N* o. m6 w% w1 _8 h! y, }$ {#ifndef qdoc
1 V* Y L; t1 N# h
; @' A! R1 D5 j2 L0 j9 znamespace QtConcurrent {
# u. Z: y3 [- N- ^ W- k" y" p0 j" Z. R
template <typename T>( f0 O9 s4 g* l, F/ l# `
struct SelectSpecialization
4 Y5 B1 ?5 [! g- @" L{
! h* V: a+ H& l0 a( F4 i0 b6 e" T template <class Normal, class Void>3 R( y& ^+ v! u0 }- f
struct Type { typedef Normal type; };- l* Z5 h8 E' e" M. R3 f0 n$ r
};" R" o u3 g2 P
7 C/ y$ P1 b* z+ D' R$ b/ C# X
template <>8 R, x. ~1 o! P4 L
struct SelectSpecialization<void>
% O, j+ ~3 l g/ G2 L) n3 I{& W% p. `) ^% X5 T& D
template <class Normal, class Void>
' F4 N7 i% z, x- z struct Type { typedef Void type; };; m+ Z1 T( o0 t2 U: E9 F4 A; b0 k5 B0 f
};
S% d" k7 s J: z
5 r5 m2 j8 A. Y* N! r, Dtemplate <typename T>0 {# L3 _( Q1 r2 A& m
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable- Q7 S& K' |" r) T
{9 G( ? T% _9 Z2 h; i! G
public:+ B% l: ^# r+ o5 ^# I
QFuture<T> start(); H0 e( F, y* k: J) g# d
{
/ q$ l, a5 H/ n% Q" w6 E9 | this->setRunnable(this);& u5 z ^; i# n# s. ?
this->reportStarted();
4 G1 m2 J: c! g. h$ A QFuture<T> future = this->future();) a% W7 M) K4 U; @/ l, A) E4 R3 B
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
1 n+ W; x, G# Z/ [+ o3 B return future;7 d8 G" {* v$ U0 D' D7 C- n' k* ?
}; `- G+ u9 \1 n3 {, q
0 @" C- F2 g) a* T3 Q/ F) D5 \4 ~ void run() {}
# f- z4 o1 T1 e9 t) U+ [( l6 @+ F& u8 g virtual void runFunctor() = 0;
0 q8 x: ?4 B; I' J4 F6 j3 D _- J};
5 |8 N1 Q& x4 u
6 X1 a7 t0 X, \* _( ttemplate <typename T>
% | c( D1 F+ T9 q7 Dclass RunFunctionTask : public RunFunctionTaskBase<T>
! S4 O% J" W$ |3 ]{% B) X8 ^& ]) T. ?
public:
D9 ^# u4 H6 [+ |* {1 b void run()
4 N, ~7 D8 c& t i% Z0 a {2 h* R$ e( M! Y; c9 f! z8 m
if (this->isCanceled()) {
* h( @- f% z/ c$ ^- u; R9 q5 O this->reportFinished();
" N/ x' r; t$ B4 d' d3 M* m9 } return;' @( w# V& B+ `7 C1 f5 v
}, q& p2 i! i+ |1 t, `
this->runFunctor();9 I6 I3 y, a8 V& E) d+ [ q
this->reportResult(result);* u, r) r& B2 k: e
this->reportFinished();
5 L& g3 ~$ A- f4 u& ] }
G; S( s! r- ]6 _& U8 U9 C# H T result;$ v& J: T. [: C8 Z
};
1 ^5 L) H4 J, O9 N: z, K( }
9 [+ H1 ?/ o. F0 P/ |$ S, E$ a; qtemplate <>
; B" h# U! d' U* j, f" hclass RunFunctionTask<void> : public RunFunctionTaskBase<void>
/ m( I. s1 k" Q# A0 Z% Z2 S{! g" \5 Z- g4 h+ Y. T
public:# n; x5 _3 ?0 e6 L
void run()* |0 O8 ~5 V2 ?7 M
{
7 ~3 m8 l6 @; t: @1 E2 ~6 W7 o6 d if (this->isCanceled()) {2 g) S9 Y, k" P$ p# y/ t$ z
this->reportFinished();4 G4 m z8 x {8 g$ P
return;# ^: S% E B% W
}
* N3 D2 i' l7 R% q* q this->runFunctor();
6 s" ]$ h2 c/ K this->reportFinished();
2 l. J! m! V8 Y }
$ B5 |" ]' L; F% Q};
: r/ M% `3 L' e: z! ?
2 J6 U2 I( V+ w+ v9 J* Y& i% h/ L} //namespace QtConcurrent1 k7 Q* A, l% j# a
* }4 B; T& Q1 g- p#endif //qdoc
2 c. l( V- O( k' u; \- S+ X3 `% r
+ _0 @' ]4 r' T5 S1 eQT_END_NAMESPACE
* b1 m( C. _6 t) }% W0 AQT_END_HEADER
) g2 E# Z; `) J7 V" J" s+ |9 m
6 z, h. ?0 I+ U$ s1 ~! f( Q, C#endif // QT_NO_CONCURRENT' J9 a1 v7 E' S" u r% V) E
; o' g( f9 a0 J1 \; {. w9 o
#endif
& f0 s8 l, S3 b
- K$ |( Y, Q2 [3 V |
|