|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
1 ~! y% D8 ^9 b e" 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'8 b; V$ Y, i& f! `1 E( j7 D, {( G
' v& N8 j4 d6 ]; \这个头文件内容如下:
i7 W/ D" B* h: b#ifndef QTCONCURRENT_RUNBASE_H
1 `# t& i5 {, w# m1 m* D: J7 ^#define QTCONCURRENT_RUNBASE_H
& ^1 l4 g0 g6 Z3 r" ~# b4 l7 E/ r% w$ Q& u/ v# |: e- \
#include <QtCore/qglobal.h>
/ T* X" P- Z) `, v% X: |7 M. Z2 z/ h: u
#ifndef QT_NO_CONCURRENT
N' o3 X, e) n6 ]- ?* S
( y& ^; j7 m h! c1 q#include <QtCore/qfuture.h>7 S n( p/ |" b0 y8 d9 f9 @
#include <QtCore/qrunnable.h>
3 L9 c- j; }: i' L/ S#include <QtCore/qthreadpool.h>- G- L/ s# X k' [5 e8 c: d
3 X+ v% L+ t5 Z. f6 u) r; r0 PQT_BEGIN_HEADER4 ]* B0 O) c; D
QT_BEGIN_NAMESPACE% i2 u- \$ T' [
) b0 M ?& t. rQT_MODULE(Core)
2 c/ ^' y o& c5 q; p- T. T0 ]% q
4 k h. k$ b- E0 a#ifndef qdoc% z7 n2 A1 Z" ^4 k; R+ J3 w: ]
! v1 Z$ e; `& T7 H6 Y2 M
namespace QtConcurrent {6 V" p2 H% W+ H$ p7 L T
. m( ]1 _6 g3 ^( Otemplate <typename T>& N: }1 w0 |, F& O3 v: Y
struct SelectSpecialization
" N5 D$ L) ^6 }2 n( t6 Y" T{
) C3 [- h( x/ ^- \! O template <class Normal, class Void>1 H V3 g$ T- @$ O" K/ W- C
struct Type { typedef Normal type; };
' t& A8 l1 Y% d& F};
$ z5 w! u5 D1 n
$ N" }7 E4 k% ]- s) \% s$ J" Gtemplate <>
# W: s6 m6 U t7 }* @1 lstruct SelectSpecialization<void> G- S7 j7 C C# N, e0 A0 k5 i, u
{/ f2 U0 y o& S2 W. ~8 j
template <class Normal, class Void>( v, \! G% v, { h* Y3 [
struct Type { typedef Void type; };
; \0 N6 b8 _; @( p. K};
5 H+ F! E3 \ g8 W+ {
! J# _. p, z0 g' s9 @/ e5 m ctemplate <typename T>* I# w2 {3 U5 W/ m. l
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
) k3 l8 M+ D4 W! I& d0 y{' A4 j* @* d# q% q
public:
# W: U# x, a6 x8 z) t; ` QFuture<T> start()
8 L" W4 B. X7 ~; ? {) @# u! p0 m% \3 e, p
this->setRunnable(this);0 j% ?/ A- i! w
this->reportStarted();5 J9 v* I! Q# Z3 b+ o& L% Y. D
QFuture<T> future = this->future();
3 y. C; P; r4 \! b# Q* ~+ g' v QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);4 P4 Y7 y1 ]1 _2 L, w9 o$ @
return future;
/ \. ~9 |# S i3 d/ G0 K }, o+ I! J' |* H( p" e. ?
4 [6 _+ T$ O# w7 u( S1 l9 a. n
void run() {}
H+ }5 S! F# X+ O% H virtual void runFunctor() = 0;% x& O$ H# x1 x8 E/ ]
};2 s' j* M. {" G; u/ E4 L
! t- c0 I6 J! R& t! B0 L
template <typename T>
/ ~" N) B& k* S4 w9 A; Jclass RunFunctionTask : public RunFunctionTaskBase<T>; q6 Q2 g1 p; N8 `( R' p2 F
{" d( R1 u& Y: x: J) w" P w- m
public:7 W" z# |. r' U
void run()
1 y |& O8 Y8 d+ ^ {
0 O% I- G3 q5 {3 U# {; ^+ X& K if (this->isCanceled()) {
, W' O/ D, @" `5 Y' J6 F' T1 t this->reportFinished();- {: n1 g# x8 n" ~
return;
3 g$ Q1 u2 `7 U9 L! e- | }
# I/ M) H6 D" x: K5 s P( B# K- ^, n this->runFunctor();
8 n: q0 j6 T& Q this->reportResult(result);, X% Y: j2 p* ]3 {3 g
this->reportFinished();/ j& S2 Y2 P0 t: b4 H* f! D! ^( E
}/ ^0 {7 m! Z8 z
T result;" U% i( c# N4 h/ v
};3 r6 t8 Z6 j( ?9 E+ _* {$ u1 r
$ R! z5 J3 u1 i. i! stemplate <>! E" D$ I1 N9 z. T- x7 ^
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
4 d/ N1 t9 G3 T8 ~. w3 `{" J4 h" [4 j- O; S# X, K
public:0 g- _6 g! v; a2 j# k
void run()9 a# T8 N6 [$ H" F6 _7 u# S+ F: T. w2 p
{
8 n2 `+ Z8 m4 @9 |% }; ^) B if (this->isCanceled()) { P: W( e" J9 ?, A; E3 Q0 K
this->reportFinished();
; O$ ^# w; c. {, j9 F& c6 Y0 y return;) s% J) @ R0 i w3 R- X
}! k4 k ^! `6 f! P4 q8 O3 z# X
this->runFunctor();* q! g2 C$ W' p1 t* p- r
this->reportFinished();# d: \0 `4 K4 ~' N/ M! W
}* f+ u& D: {. A1 f1 \# J2 m# I" b
};
8 ] X: w @# B- C% h! @- A6 P6 L# z1 q
} //namespace QtConcurrent
4 Q8 @5 [. ^2 f) Y4 t, ?
: F9 l$ a( l- G1 N, i7 w- m#endif //qdoc: K! r. W9 k3 ?6 ?5 j8 }: O- p
( x, u" Z( T+ b# ?7 I7 G) L
QT_END_NAMESPACE$ B# G$ e2 a$ J, K7 F* v3 O
QT_END_HEADER
! I( V) \7 L, f @4 K! d' G; w: e1 O; m9 Q6 ~
#endif // QT_NO_CONCURRENT
/ v9 l8 Y% @2 r& G: v r( b0 ^; P7 [+ v/ C/ C% \9 b
#endif
1 x- J) Y, A7 `
* Y& s* }, {$ y5 `0 r |
|