|
|
我对syslink进行交叉编译到arm,但是出现如下错误:# Y, g) I' n. @2 R0 M% l0 |; o" V
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
9 u( a' a4 D4 D& j* o/ d% `( {" W! W8 x
这个头文件内容如下:
/ Z* `1 T2 T* P6 d7 g7 S+ B#ifndef QTCONCURRENT_RUNBASE_H* p1 M: W4 N2 u3 }! ?; l5 E1 @
#define QTCONCURRENT_RUNBASE_H
5 r1 H5 N8 |9 d0 [+ e% R( e+ x2 P/ F2 E- _
#include <QtCore/qglobal.h>, O' y9 a8 m( E; c* s
* `, ~4 q( O; W$ n, K6 I
#ifndef QT_NO_CONCURRENT# [5 b. i, G! ~7 x* e, `: |
2 F2 K9 v1 P) W5 A- X: r( [#include <QtCore/qfuture.h>+ |* U! z# A) T6 r6 J" [- ]6 L$ J
#include <QtCore/qrunnable.h>" A7 m( R; P& R+ [2 \% v2 g
#include <QtCore/qthreadpool.h>
; p- W T( Q0 E2 R$ @. E
0 v w. j+ |0 W* R; t" KQT_BEGIN_HEADER
! d ~2 x+ q, sQT_BEGIN_NAMESPACE
2 _, X* r$ z6 \# N" J5 v) v, r, j4 W5 K# y/ g7 ]
QT_MODULE(Core)3 s! O' S2 T4 M6 V7 k
. ~5 V( j0 A+ s' W, r- |1 ~#ifndef qdoc- B4 J3 W2 Y& l3 F' L" q+ L3 b
/ V. P9 |; w6 m- }! H" T
namespace QtConcurrent {
9 v4 g+ u. \! E8 g- @3 W1 l7 X& u* E" u8 B! _3 V1 Y
template <typename T>! f5 `, k1 Q8 M& V9 n
struct SelectSpecialization
m$ H) p/ {& b5 Y% V{- B6 o. D) E* H A: a( _
template <class Normal, class Void>
3 J6 \ X" K w" R5 I struct Type { typedef Normal type; };
" \5 b4 i5 W8 T( [ M. y. R};
% r9 D f: Z. g" r2 P- n
. V/ ^4 g& R5 ktemplate <>7 ], [# z7 D: d/ O, R% P" V. d4 P
struct SelectSpecialization<void>
' l) o* }4 L+ Y, }" ?4 C# l{
% f6 O* v5 }# t7 j9 Q9 u' r7 Q template <class Normal, class Void>7 B6 f: k) v( D) \1 S) W
struct Type { typedef Void type; };
5 H" w; ?4 D" s8 e! d};8 B# g: E3 E- n, x5 Q
M: q& Q5 i! B! ?) }) x/ x. ftemplate <typename T>
5 T0 l& `8 o- d' Bclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
$ Q% ?9 }9 E8 E E7 x5 X3 }{
7 A% s. @8 o' }public:2 T* F) J+ |( N' E$ D" |0 A2 ]
QFuture<T> start()
9 u1 ^8 P' y$ c9 i1 ? {
8 ~0 S8 V, p. s5 v0 h/ w) ]6 | R0 Z7 n this->setRunnable(this);8 m( X) J$ I( K5 N) o' P# s
this->reportStarted();
4 b# G9 J/ B: o; ?5 V8 `& F6 c QFuture<T> future = this->future();
- g4 S8 G! U* I8 f5 | QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
+ [1 H5 {! h* O9 C1 K2 A6 W return future; e2 x, h' K+ U
}
3 U! V. G2 S5 S4 q' C( a A+ l
% H2 ]+ B- w/ Q4 t void run() {}
6 N& W& h# b7 X- g% b virtual void runFunctor() = 0;
4 k. I0 b6 V# h* P5 d9 y$ t, [};
( n2 D, Y8 \9 N- e# w: v9 l1 v. m. A0 r1 [/ x& d7 J, P2 ]
template <typename T># c3 K- f; R# B- H. G
class RunFunctionTask : public RunFunctionTaskBase<T>7 y. m- p U! h3 t$ U6 a M8 t" g
{
; ~# P. P; ]0 g$ ~public:
) Q2 o/ ^7 V& \$ j void run()
5 z9 e" P$ s; `# j d( g {
0 N( @2 U" z; T. d4 C if (this->isCanceled()) {
2 x- m; ?4 M* Q# z( Y0 V8 U& R this->reportFinished();+ g$ X" r- \9 f% l$ f' p% R$ P' {
return;) M6 |/ F- V( ^! d. ^
}
, f f2 s/ p7 | S/ a R4 S9 X this->runFunctor();/ Z$ b# m0 c( k3 v
this->reportResult(result);, u" ?6 i* T- p+ G3 a: r
this->reportFinished();
$ B& o B/ [: |. W }! y, H& K- G* w* |% a; {* D
T result;, Q$ `# w9 V9 U- X1 l' w0 W% J" \2 a; P& r
};( ^) l* C3 T8 m
* j+ z F9 ~* N% K m2 k% c/ v4 Btemplate <>1 i4 ?+ `& S. K( H0 \2 Q7 H
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
7 Y5 g' O( A3 C: w1 F9 C" u{
' T$ ~3 E1 [- j: f7 Apublic:5 v- L u0 V' ?+ C" T
void run()( A! Y5 I- f3 U4 j' t
{
1 q) ]# Z( R/ j- u if (this->isCanceled()) {' I' S5 U: p, b7 I
this->reportFinished();
Q) s/ V! R% s' K return;3 y+ v0 }4 t& P8 V- _5 w
}: N; @- v0 ^6 K6 g
this->runFunctor();8 ^: p9 ] W4 l" B
this->reportFinished();/ D4 J* k3 P6 _/ J8 q4 W% b! F
}2 R; X" H& O; p% X6 a
};
( x$ T0 s6 q/ { E6 B7 N! a
9 b0 T' j2 v7 [/ g* {} //namespace QtConcurrent
. V7 K" C3 z5 n1 o! u
' `( D) V1 W3 p- |$ ?#endif //qdoc6 l) c b3 _; c
; P+ E) n, h' Y
QT_END_NAMESPACE
" V( J( K1 }* z1 o: r S. cQT_END_HEADER- e1 c% Q0 F: h- r( j
/ t. C2 s4 _% D0 k1 w2 c3 Z#endif // QT_NO_CONCURRENT
G* _6 D {/ C8 |
; n- A) S& o2 u: f* l; _2 F, O2 D#endif
$ i' N+ C. s4 G$ j7 Q2 L) _$ y! i
6 q$ _2 b! o% u& a" w |
|