|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
, p4 q' E0 l+ I5 ^/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 q e* d+ L' v: W/ V
7 s+ e: a1 x( c" T
这个头文件内容如下:+ ^5 P1 c8 @5 Z, P/ ~* Y# f
#ifndef QTCONCURRENT_RUNBASE_H l5 w" |9 C8 W
#define QTCONCURRENT_RUNBASE_H
9 i9 ?% r* W0 |3 ^( o/ W
2 P4 i* r% T: @3 ^. T#include <QtCore/qglobal.h>
" ]6 O, ]1 Z" X% r9 ^1 z9 \' U# d* y$ \& A3 N' u" a
#ifndef QT_NO_CONCURRENT
/ H- r5 Z2 Q- U* ^# ^/ X" E$ C6 S3 P0 I) O
#include <QtCore/qfuture.h>
% i3 }8 L5 r- F/ f0 \( V* K#include <QtCore/qrunnable.h>
0 B, z( I s( T5 O. ]#include <QtCore/qthreadpool.h> o6 S0 S( `+ H; V1 d) N' _2 Q
: Q9 ~$ R' Y! d+ c) F l# TQT_BEGIN_HEADER' e) `- w$ d, q7 |& P" c
QT_BEGIN_NAMESPACE2 ^9 N, b6 _$ B
% D( [% `7 ]2 U9 p) A7 mQT_MODULE(Core) D6 R+ B, y3 \4 A
0 e0 L( Q a9 \& p0 T# C' {$ Z) h
#ifndef qdoc
8 Y4 [' L( g8 s/ a3 j3 q) u+ B" B4 E1 H0 @% K1 J( d- \
namespace QtConcurrent {
2 h/ f3 k* U& o' @$ T9 r' x' k! l. v% ?1 e6 O ~6 z
template <typename T>
+ I! A: w( {$ f5 e1 ystruct SelectSpecialization6 e+ v1 y; I7 W A% g! b
{
; K1 k L1 P0 ~7 O _ template <class Normal, class Void>
0 `9 _+ l; j( S2 t9 \: @* [" e2 @ struct Type { typedef Normal type; };8 {& y7 P1 | ]" a
};
7 @" L+ b! Y3 a
1 `2 S) k2 H+ k0 D# G X! \template <>3 ^- x% x# l: ^8 N+ p
struct SelectSpecialization<void>8 r/ t" s6 E4 \# N1 t1 D3 d
{
6 j) n0 j( a' F. [- o8 r# H template <class Normal, class Void>
. |# i& m! d# B- ? struct Type { typedef Void type; };) V9 U0 o# k# b- D4 j; N7 u
};
4 k! ], I9 v! p3 n/ I6 ^ _. d- f1 a0 K7 p- ?1 z
template <typename T>
# Y+ k0 J+ K# t0 k# z* G9 mclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable) s7 V. @5 v9 P( N7 r
{
/ }$ D9 i! d9 s+ S: _5 Ppublic:& S+ {+ ?0 o% d& d
QFuture<T> start()
/ ^7 \9 k6 \5 k* c* F0 r {
0 P! f9 x6 F3 p' p this->setRunnable(this);
- | l# @ O6 Y this->reportStarted();. H g% u: M6 x# M/ f7 h8 h
QFuture<T> future = this->future();- E7 r% ~2 y+ S( x. j) c
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
( E$ V' i8 s2 S return future;9 t" b* F8 L' p ^7 c' {
}. l8 [. ^) e: R( A9 {3 t9 u
+ l$ O! F0 {; v8 F! A; p, O. `
void run() {}' N8 T1 I" ?- @/ p1 D
virtual void runFunctor() = 0;- ]% g$ ~+ ~- Y
};! l/ f1 e0 X8 I0 s* p+ N, a' U
) c( v- y6 f* g' J+ ?. k8 G
template <typename T>& V+ {. \% a& G/ c2 J, Z
class RunFunctionTask : public RunFunctionTaskBase<T>
3 ^ T i$ T! }: f$ K1 X. `{
( S& E. Q" }+ X, \: Lpublic:
) [" x0 A% O" t( r void run()- s2 c; _8 a3 u. H( ^
{
* U0 B, i0 ?4 f/ b0 r: R if (this->isCanceled()) {. [5 R! |" K, c, l( B
this->reportFinished();7 `0 l& \5 Q& M2 t( B
return;, c5 _; u& k! M+ e1 `- q( `! V
}. s# a( O& k9 P$ N& N a
this->runFunctor();
/ ]' w: F1 ^2 I+ E this->reportResult(result);
6 p6 Y0 j; @6 Q this->reportFinished();) s. b- e: }4 l$ u
}
+ v9 ~5 w8 y( L1 W4 N3 B, S T result;! a, s% O" _2 c6 o. b1 L
};9 u. l8 Q5 ?0 ?/ u
0 M9 z+ i5 g! i, k
template <>" O% X# N6 j( i; I( X
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
7 O" x, {. m8 c2 ~1 h2 a* B1 b$ f" P{" [, @; m% B9 U/ a
public:
- s! A: t5 }- q4 ?4 }* [6 Z) s void run()
. T) j, A9 `! I h9 E2 A. v {; K1 u, f) H$ E$ z; v
if (this->isCanceled()) {+ q/ P C2 i& N! X6 O7 v; e' H; o
this->reportFinished();
" J- K! B5 V2 S return;2 ]' n$ q9 R- W# S$ m
}
4 ~" A2 f v8 }& l0 o this->runFunctor();7 Z m; M2 X& A
this->reportFinished();+ x4 `" J2 {! |' F
}
: [# Z+ r8 u! C; T% C};, g: P/ G" ^! W" Q8 n8 g R. W
/ o) m, t! \- p4 X} //namespace QtConcurrent
8 ~8 }7 Z2 t& h5 B
4 [( ?7 P5 v% s#endif //qdoc. l1 _$ u# B ^/ s8 p
: Y' e$ ^* S3 G: L( x
QT_END_NAMESPACE L; d u* [) o! T' ?7 [4 S
QT_END_HEADER
% h D; E B* C" L# z3 n3 X: Y7 \
#endif // QT_NO_CONCURRENT
a9 y. o2 Z. y0 q* F4 ~; [" @
$ g0 g! v' _/ O; l, x#endif
; Z* W3 `: X! e% ~0 ~
. r" _8 b5 O1 F |
|