|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
# Q3 L" A# A: r9 ]/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'* G6 @0 w, M6 T# y
% S4 x& W) z$ e K% B这个头文件内容如下:
4 B; z4 ~& T9 H0 }# d" S7 V#ifndef QTCONCURRENT_RUNBASE_H7 U6 p0 e9 s# X" j$ O3 @5 U0 F
#define QTCONCURRENT_RUNBASE_H
7 M+ p; v/ c* A( c! _2 _. ?4 R" K) _, M. z/ h; w/ d$ z3 `1 ?
#include <QtCore/qglobal.h>. [+ F. Y$ f9 ?' F
7 N9 d4 D$ k _4 d
#ifndef QT_NO_CONCURRENT3 p. s- k \, Z) j; _! A+ Z+ s
! @( C. \( Z5 ?0 |$ F( P: U
#include <QtCore/qfuture.h>4 O9 h$ E' x) X2 b0 y
#include <QtCore/qrunnable.h>' V& G, u1 Z# Y" q+ h5 P
#include <QtCore/qthreadpool.h>& `' Z, ]" A- x
* F* G6 K8 _3 v2 I0 S$ t8 nQT_BEGIN_HEADER0 n$ `4 B1 B1 h) w: v
QT_BEGIN_NAMESPACE
( X0 v3 p! y( u5 ~5 `0 B4 o+ |' V1 H' L' p
QT_MODULE(Core)6 |7 v3 J, T$ r5 r& ~' j. F
' I T+ B$ V: J" @- z3 C& j' \: F- ?8 z
#ifndef qdoc! i- s) [, ?# c8 k/ q+ y
; @! V) w2 \' Z; ?) Z" ^
namespace QtConcurrent {0 z! w2 Z6 h4 \
# I- z4 b5 J' E; ]4 |
template <typename T>8 g# U2 c. }9 F5 G
struct SelectSpecialization
! N9 O. M; _9 w/ L9 s{
% v9 w3 @- ^8 H9 `" A A# e6 d" s/ s4 ^ template <class Normal, class Void>7 n) @$ |/ f5 b5 m2 O: T" u* W
struct Type { typedef Normal type; };
) G( `6 O5 y; x4 o D};6 f$ @- ^7 q8 E, K4 d6 m* o
5 Y2 q% b8 P6 ^template <># K0 ~1 j6 E0 D! I# W
struct SelectSpecialization<void>1 a* P. W1 Z3 t* q _
{5 _; t; s" f. ^
template <class Normal, class Void>
; }. `' e% l8 E# A! D5 k. E struct Type { typedef Void type; };
9 }5 f& h& Q& p) B7 l9 L9 ?6 e};
$ ~9 K( {- j/ [% y# @3 N& A
$ b/ \7 a4 t, y% |" N1 _template <typename T>
: H. J+ k) L# a8 z3 P# kclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable1 `8 k$ f% C5 I- [6 N; k) D
{) Q4 X8 T3 _: C7 U! b5 k$ y
public:* |8 l. y# j$ C2 C7 \
QFuture<T> start()
& F2 _. i% e0 N' p) d( K2 G K {5 h' ]: `' ?8 D$ m$ g
this->setRunnable(this);
1 w, G$ Q8 H, e! l. K this->reportStarted();3 B+ M0 X5 E- @/ [: f
QFuture<T> future = this->future();" H7 F+ y0 b- G8 W
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
5 F) g7 R, ^9 `; D: E7 T: e2 N return future;
- P' Y( W1 [2 ~ }
+ l! W9 X$ _4 D
) P; y* ^( s" d* [ z void run() {}0 i8 K1 H% f# }8 d. W8 y% s
virtual void runFunctor() = 0;. o3 _" V% y( A$ Z1 O
};' C4 c8 T3 t0 ]6 X: b% k' J
& T- \# ^3 q3 a/ g* ]: A" Stemplate <typename T>
& K$ P( u8 T* a; ]% Lclass RunFunctionTask : public RunFunctionTaskBase<T>
, X) X1 R( ]6 I: q% y1 j{
! Z: }1 P4 J5 K) j! ~2 _public:
! M* [* |5 {" ?! p: Q void run()7 Z7 C \# V1 K: ]
{
- L+ d- K% u& w: y- D' q if (this->isCanceled()) {
5 Z9 g3 P- p+ e( [3 N this->reportFinished();
M2 n6 q8 \1 y4 L1 k3 e! o return;
4 c+ @3 y% u, W6 W9 o/ D }
$ T5 f# p% C4 ^0 g) J* U this->runFunctor();6 n, p$ Y6 S; i6 ^1 u
this->reportResult(result);0 ]8 X8 U6 J8 s; l
this->reportFinished();
7 q- }& ~7 R4 r0 i% ^ }
7 G% \1 j# ~+ N' f" z T result;
3 Y& A7 z0 g! T( O* O};
8 l0 z. H# P; I7 V
8 u7 Y5 F/ D0 s, h7 O. btemplate <>/ d4 _* I. n1 x5 ]
class RunFunctionTask<void> : public RunFunctionTaskBase<void>2 @) J" f- d* ~, f3 z
{ E4 J$ }! Q- g$ h/ e; }& G
public:
( \' u+ P, b5 D: Z, f3 k void run()$ V/ t2 `1 c( ?7 E9 z
{
h5 ~0 ?+ R. s: i- a7 E# T( x0 c" U3 T% e if (this->isCanceled()) {
$ j* p2 U1 ^: D) t ]) @4 | this->reportFinished();; M( R h% i2 L
return;* S8 n. a% M8 t6 F2 V/ J
}2 d0 @8 W; M' {; I2 H R/ X+ Z
this->runFunctor();
$ e9 [* F) h P% Z) W3 M: o this->reportFinished();5 j5 Y% ^8 F( I2 d- ~7 ? I
}9 | ^; @& [; y4 v9 S
};- P3 e; N: F2 s: i2 b
( ]: B3 G3 n6 C- X} //namespace QtConcurrent
" |0 Z- Q- A, Y4 M- _
" n' E& b7 H6 ~+ [* _$ Z- D#endif //qdoc
3 l# z+ y3 B; Q. O; W, ~, J D
% d5 t: k+ Z1 B' BQT_END_NAMESPACE2 s. k0 T: J- ]3 {# D+ G
QT_END_HEADER* h/ R H% B5 c% }6 Q$ F! l4 S7 r
" O r. y+ |' _- C+ {#endif // QT_NO_CONCURRENT
) Y7 _' W L5 j( z( `! B6 E
( k3 Z' G, W& Q1 G- |4 }#endif
+ v% c2 ^+ U& J$ J3 v6 |) g- V
|
|