|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
$ H9 [. {3 r$ o: c' y/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'; b0 w( W" { g t
8 {+ s. T1 U; I- C这个头文件内容如下:
& F' r& c( R0 B( S5 I8 V#ifndef QTCONCURRENT_RUNBASE_H
0 x+ m, ?5 d: Y#define QTCONCURRENT_RUNBASE_H6 A1 e$ ?8 M% T0 u0 {" i; [
; K3 e6 g/ p- T
#include <QtCore/qglobal.h>
, g* v: @& V) k# F I) x9 J$ @1 H. P. l$ W7 p! A5 |
#ifndef QT_NO_CONCURRENT- G* t# z ]2 l. J1 P" k) k7 g
+ T3 g2 l; d2 ]' U2 L5 t#include <QtCore/qfuture.h>
1 j d" |$ y" m#include <QtCore/qrunnable.h>* R# X6 q& Q# }9 H) C8 P% `
#include <QtCore/qthreadpool.h>
. `$ q0 q; [3 j" @7 U w0 A$ [4 N; L
QT_BEGIN_HEADER9 \0 X- x# u* t. b1 A5 q* n8 R. U" C
QT_BEGIN_NAMESPACE# U8 d+ [1 w! ?# n* ^( o" E
/ c* X* E$ W% x* e9 qQT_MODULE(Core)$ P5 G" r7 t- z' {' `) e2 R
3 G6 o6 I6 n6 M* b+ Y/ o! ?- k
#ifndef qdoc
# ]" k) Z- U2 @: ^9 U
3 O9 I4 N! { }- l5 m$ ?namespace QtConcurrent {
. Q* N. j4 s( @# E1 U# t9 g2 p: H s0 O* |! i+ s4 [
template <typename T>$ e" |6 y# p$ k8 V; b. I9 }
struct SelectSpecialization4 {' \+ c6 R: W
{! m9 [, m& O" c2 f) a- Z& U
template <class Normal, class Void>
) i/ V+ E0 r6 g/ M; N6 f9 f# S struct Type { typedef Normal type; };
& Z' `* j! k/ P$ g. w) V4 I" l};# g7 f1 g" o4 l7 d: `2 B: T$ l
" ^" a$ w4 _+ g7 Gtemplate <>: T6 ]0 a* t Q7 E
struct SelectSpecialization<void>! o' L2 h' n5 d) Z8 F) H
{
6 h" |4 N1 l6 ~( Y+ m template <class Normal, class Void>
8 j1 k! L1 m! }2 ^. r struct Type { typedef Void type; };8 S8 q6 m0 M- @: H5 v! r& R% U
};% Z0 q6 `- z7 d+ n- g
% f, W$ h+ D. |& |# i Utemplate <typename T>
$ I" V$ i/ s9 B4 U+ f4 f& ]$ W" fclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable# O' \( _" E, r
{# {* ^4 ]2 T; _! U$ _; N
public:/ P8 V/ Y" E* A/ u: Y
QFuture<T> start()1 m7 U3 v3 C j
{
0 n+ J$ h% F. b: M# e) j this->setRunnable(this);- f9 h& c% c( u4 @( e) C0 B
this->reportStarted();9 f4 B8 ^7 U% n# v! m4 ^0 R9 [# r( ^
QFuture<T> future = this->future();% c2 m& _' ~( S& W, e
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
1 n! O* N8 O& X4 @& ?7 o9 X) Y: ^ return future;0 g6 ]' l( _) f% w h- h( I& Z
}
' p0 t9 h8 ~8 t8 @
2 z' l9 \5 ]( @1 e+ h# i2 H8 C void run() {}
; B3 `) M# J" s B" R# ^ virtual void runFunctor() = 0; r) ]# `0 R- @; m
};
1 O5 N( A. e+ \+ V: M* \: A' G/ _4 z* L6 d; g# b( M
template <typename T>4 q( q3 r; M; A/ ?9 ]
class RunFunctionTask : public RunFunctionTaskBase<T>
1 _! \! f/ `4 s4 w{
], m, o( X# ^! q4 i8 w# fpublic:
- z7 o% k1 L* h$ f h6 d* o void run()* p0 g# P" l" j! M7 q0 G7 j" g, `
{
4 P. R2 q. b* G if (this->isCanceled()) {
" ?+ l0 D9 w$ q- P/ a this->reportFinished();
9 J: u* @: p& |7 L return;% W( {4 O& b) O( X3 f
}
) N* f: | p- X: A this->runFunctor();
0 E7 m% e7 O1 @8 W0 ? this->reportResult(result);. P; Z. W6 n- }! R+ D$ y1 c, i: \
this->reportFinished();
* p* O. N) |+ m& h }" W- V m, u8 Q4 C. z
T result;
/ ]( V( ?3 J" b- p! [};
& Q3 Y+ u* L' z: J: z9 l) r- I$ I6 t8 p* G
template <>
' c! x; C0 D9 t- R- }0 Oclass RunFunctionTask<void> : public RunFunctionTaskBase<void>4 c- ?6 H. T6 K6 }7 i/ E, O$ [
{
# B4 Z5 v' b$ P6 mpublic:, x# [$ T O# R( c$ x
void run()
, I% V$ s; w$ m( D, v$ j! e, J {. Y, @) H& b2 t, G! k3 X! k
if (this->isCanceled()) {
+ {& X: |9 s/ t, m this->reportFinished();
$ g, P$ o+ `1 h$ _ return;
9 F& R, S6 ?) o0 Q }. g6 ^: P7 D! ~6 u. \5 Y K* Y+ ?* ^
this->runFunctor();
$ H* K8 T" n! r+ R this->reportFinished();
; B. F( j& u# A+ _- d5 `2 x0 ~ }
: o2 U" V9 W+ C% z- k! x' e& o4 U};, a& e* t2 ?* @
e" ?7 k2 |7 M6 h% `; w
} //namespace QtConcurrent& c" s' H8 m$ ~/ s
4 b8 d3 t, r/ `8 G' X#endif //qdoc. ]6 `' V% h7 `4 m8 J/ T
5 o/ |, R4 ^7 n1 o0 ?+ C2 P0 U
QT_END_NAMESPACE: i" R0 c2 [6 @7 {
QT_END_HEADER" e& w8 j" d G; y3 \
& r4 B- q& u8 b0 R( }- [#endif // QT_NO_CONCURRENT
# V- P( R! H0 Y4 N6 k& Q) G1 @* h" o1 @: c+ P. E
#endif& R4 v$ g# N8 J3 C: I6 Q) V6 i/ n
1 B9 Z( N* D- X* V& K |
|