|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
: O! u1 x) Y! ?. q9 W8 f- Z/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'5 k% m; j0 C$ ^) ?$ q; S" s
: |9 O; Q( n9 ~: v这个头文件内容如下:8 ?$ {* b7 g3 U$ n3 ^
#ifndef QTCONCURRENT_RUNBASE_H0 [: w- b( S5 B, V
#define QTCONCURRENT_RUNBASE_H
6 C. q! X, I. L# N1 R8 r7 R8 e8 U* b& l' w/ a4 ~: K. J% M3 k! `
#include <QtCore/qglobal.h>
* t0 i# P( q7 x N# b( U
! Z7 r; v R4 ~ R. D1 L#ifndef QT_NO_CONCURRENT A9 Q4 e$ ^/ O5 c$ J# H( i
4 c2 a$ g; i: [# t! D#include <QtCore/qfuture.h>
+ i4 y7 j/ _7 I% `+ ?#include <QtCore/qrunnable.h>( h# e$ f* @5 N! E" r
#include <QtCore/qthreadpool.h>
" {1 _ ~) O1 B2 A- D3 J; e; ^8 v# Q: g* I
QT_BEGIN_HEADER: v2 z" A2 ?; B8 z# ^ r( w
QT_BEGIN_NAMESPACE
4 D& g: p5 q5 w" F. }. @$ l, _, ^# f# `" T8 c4 E
QT_MODULE(Core)$ l, F5 {7 P9 H5 _& _, R
5 C" s7 n, |% T9 C1 d: P5 O& `) a#ifndef qdoc0 V/ y1 t! K1 U( r0 r2 V
3 h1 q! c( @ J9 T( t4 S2 fnamespace QtConcurrent {
_) A, m; O0 m% \& P* f! `& l; ]: x, i* `0 n1 o$ F B
template <typename T>- ?0 V- k) j1 h# S b/ j2 P7 b
struct SelectSpecialization
" B2 R7 K" P H u% T5 F) E6 Z{$ p2 m% b) e2 g
template <class Normal, class Void>) v- V$ U* C: |$ Y# e8 i
struct Type { typedef Normal type; };
8 t6 y7 G+ g* U. f) A};
4 f; ]. n+ p2 U& u1 |
) [* ?/ f2 l; ?, Q7 etemplate <> v1 p7 M2 y, g8 _$ Z1 _, H0 Z
struct SelectSpecialization<void>
) _8 \1 H) n% j. b6 ^{; y; i7 {# M& Y- ^
template <class Normal, class Void>% K" }% Q! }% `* N$ G: N
struct Type { typedef Void type; };$ T! ~' U+ o7 H) x1 Y$ o
};9 }) [' p1 O: `: M
! a2 N5 w- E D1 N# b
template <typename T>, ]( Z2 n8 n1 r
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable' V# j+ b# K. ]2 [! P$ w
{
5 f. R2 \" y. L" T1 Jpublic:
/ x0 L' P" i, `' c3 f QFuture<T> start()
6 _% Y* Q! g; ^0 h8 M' B! b {
0 J" W9 |! i5 B8 s this->setRunnable(this);
2 [; F+ d/ w9 V& o: s }& G this->reportStarted();% q( M s r e2 f6 h3 {
QFuture<T> future = this->future(); ]4 T# P5 u* |& b( _* M
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);: p0 W7 v9 m0 c- S ^
return future;% ~5 e4 x, e$ v5 Y: F! |
}
4 t( ]( {% X1 k! R
3 \9 ?8 i% T/ Z; U( | void run() {}4 p4 T1 V+ S$ O' E) Q1 k( i
virtual void runFunctor() = 0;
3 N u1 b! G$ I3 A9 F( K4 T& l};1 r( r& J# E! ]/ w( U- Y4 l4 \- @
% {" q* w/ a- a* j( Z0 ^3 Ttemplate <typename T>
- Y8 h7 u$ Z* ~4 ~9 |" H+ N$ Kclass RunFunctionTask : public RunFunctionTaskBase<T>( J# W$ \+ B! a' m5 c- E
{: k+ v9 l3 K" g; I: m
public:7 x" v, ]# D, o1 G/ q4 Y9 n
void run()+ |% [3 C: }+ c2 N- i5 l5 U, y/ \5 L- s
{9 T7 v: c7 `; Z6 l
if (this->isCanceled()) {
. v" W( I: Y; `) B% N% f3 r4 j this->reportFinished();" V0 b) O) ]5 I0 ^& y
return;
) N8 A w- N* `* r( p8 ?6 } }% S( Q1 A1 [* `8 x
this->runFunctor();
) J" O4 d3 f8 x" |5 h; c9 T% | this->reportResult(result);
2 j: m3 a! F l; E this->reportFinished();! x: E, X( F; _) {
}) _( r; e) R0 u! k, }) \
T result;) [' X& Z/ t) F5 A9 `; S" L% Z& I
};
8 [+ a7 K( h7 z: d6 q4 m. p3 x/ j, Z) Z5 X
template <>) S1 @% S9 o( L7 ]. h& X" x
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
5 N2 X8 F) L& C{
& |; p2 u [/ H4 q q# Vpublic:8 J @. z* _6 e6 K" f: M* i+ @# X
void run()6 v3 W; N8 F- t, o7 ]
{" x3 i, M- m) d) H' r8 [5 Z0 m. U' L
if (this->isCanceled()) {
( D) t4 ~6 h g$ I$ x) _ this->reportFinished();1 F- u9 B J% \
return; A, B( S8 v. ], u
}
$ O6 n: |' \# Q( ^ this->runFunctor();: F; G+ E/ P+ P# k, C7 [/ h
this->reportFinished();! g. L8 }7 M6 p! W7 |* l
}# M# \4 ~8 P6 W5 r; r
};; x I5 K- b- g8 t; ?& R
3 r5 {( f, _- j} //namespace QtConcurrent
, _7 s7 \& y- e6 H+ C7 }9 g3 I
+ a+ e4 | q. s#endif //qdoc
5 r' O+ d- N' n! l0 s L0 C. p6 B2 i, x1 R: }
QT_END_NAMESPACE
3 i8 A! k! X6 D7 K# L* R7 ]* @+ uQT_END_HEADER
; O* D0 M8 ? g' ^ E0 L' M: [7 y/ m, p+ k0 e* E2 M4 r" [, p
#endif // QT_NO_CONCURRENT
/ F y# a6 B/ [7 O2 k& A. s8 i+ |& X x
#endif! _5 n3 T. V! g
/ P) j( F0 b% w* V6 {
|
|