|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
' p5 J( z) c: v( v2 i/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'1 t9 B" b! _2 h- g- f, e$ u$ H# m
g3 \1 U/ i% s/ E+ d& _% T这个头文件内容如下:4 q5 m3 ~# _5 E% P# w
#ifndef QTCONCURRENT_RUNBASE_H2 X: i6 j" }' h( W& T, y
#define QTCONCURRENT_RUNBASE_H ^4 D" G, ]# Y8 } R
# K* a7 l2 S8 ~) K, E$ T#include <QtCore/qglobal.h>
! ]3 ^0 l# Q: Q; Z. u+ c
9 H# s( i& `% G) R$ C. m! z#ifndef QT_NO_CONCURRENT
& }$ D V) P) U; x+ k
8 [. n! J7 X) R#include <QtCore/qfuture.h>* Y. `& D q6 A: d
#include <QtCore/qrunnable.h># F7 J1 t- P& V* Y9 j6 z
#include <QtCore/qthreadpool.h>
' u* M6 {- n! d0 J$ C4 _: l3 o* F+ w* V) M, }# Y" G
QT_BEGIN_HEADER
9 m! ?; l( H# J% wQT_BEGIN_NAMESPACE/ \% E, o6 `% z& Z& e
5 N( s: V/ ?! }, y9 O8 U3 QQT_MODULE(Core)
) }# Z- ^$ ^* F* p; [; j* ]2 C
}5 E" p' A E) d0 c& R' a#ifndef qdoc& R* g J8 V3 i# V
- f* Z0 N% h0 F( F" q: c( A9 f& Knamespace QtConcurrent {
) f; u7 F- E( G& A* k$ u% ]+ L3 n5 [
: o, V6 s: y7 z) w6 Ftemplate <typename T>
5 N, R3 L# H4 `8 B( w( S/ H# i1 g! gstruct SelectSpecialization& ^+ R; d, j( o0 u2 O
{% ^9 ^3 G) n" I `
template <class Normal, class Void>
3 Z! k& {: m! ~1 g struct Type { typedef Normal type; };
/ D4 w4 o7 [9 h. O$ A};
9 j/ `2 Q' ?/ d8 _8 c6 L" M5 I5 p" R5 Y7 ~. d
template <>
" B4 u: X+ r: zstruct SelectSpecialization<void>" a* d- `3 Q. I/ c5 F# l
{
: `( D' B3 A* e% n template <class Normal, class Void>9 p' Q. _) t# W& U" M
struct Type { typedef Void type; };( \8 N8 Q) Q0 j
};2 s* C ?" B R+ o) e
- t; a* x/ q% y( {! c2 |3 ?
template <typename T>
( f. H. m- z$ w% nclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
5 P% W/ _7 n- ^8 k' t{
; x. ]7 k* V9 cpublic:9 y) X, J* R/ U# M4 X/ G% T
QFuture<T> start()( _. ^# g. b9 k. v
{
/ j/ |8 R5 o% H% C" p; T this->setRunnable(this); k& i' V1 S1 N4 L0 g9 e7 P2 ^- I
this->reportStarted();" {. V& I+ o: {' N; I
QFuture<T> future = this->future();
+ b, _0 Y; o" d8 }4 n$ S- A' e QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
" P5 F9 ` ] c6 Y8 O& D return future;% K/ y. E+ E. ?) M! ]5 u2 q% H
}
, C- ?2 E& {- L: x, H3 g+ J" R9 r A1 y! C9 o0 d' ]2 A
void run() {}3 }/ X5 I; X& p9 V8 S
virtual void runFunctor() = 0;8 E% F. c2 v" Q2 v) {* ^
};% R6 Q1 u- n% X! u3 l: x) B( b. K
) _5 M- h: c. s5 ^( D8 vtemplate <typename T>
7 F6 l' h1 G$ R' E6 u# n: jclass RunFunctionTask : public RunFunctionTaskBase<T>
" o& P$ t) A6 W{
( v+ H1 W3 T) Q- n% t! N) Ppublic:- u2 {# F" r/ B: `6 Y
void run() U. I/ U+ `1 O ~, {* E
{
1 n T- h" k; L if (this->isCanceled()) {
$ I; v5 E5 q- s; |0 r5 g( Z this->reportFinished();6 c- C$ A1 J N# X
return;. a* n# T+ x! b7 f/ Y3 B
}
* T( l& P0 P' M _1 y7 \; G0 ? this->runFunctor();
* ]5 @7 U. Z1 g1 H8 ^! w( d this->reportResult(result);- w5 Y+ y9 c) v, J( Z1 }
this->reportFinished();+ z! F0 R) s; }8 [
}
$ R- ]" ]( y) L& r) O! W T result;9 Y% d" M6 n" _' f ? _
};
O& p6 L, {( I
7 E& S% s0 `% _ [: Vtemplate <>3 F5 x7 I" i K2 @
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
* C, q2 t3 a* A4 u: {7 k{2 ~: S& U! t: ?- W! }$ ^/ j
public:
& V, W) K) ] i( v8 J* r$ `* _ void run()
, s8 W# v5 @ ?. U* ]4 ^) J' _ {: X* x& Z O; J6 E; f
if (this->isCanceled()) {
$ J) R% L3 x; S$ T this->reportFinished();/ N5 s' n) `* J' n6 g* u* f
return;) Y- H1 p" N" j( c8 z. M
}
" ~% ~! B" x$ r9 t6 x$ G this->runFunctor();
" ]" J+ Y+ Y8 d this->reportFinished();; G" s7 `, |/ ?* t- s
}0 Y" U: s F- y
};
( v1 s+ O( P! c
( a) g9 @, B! o% ~, u! A9 \0 X5 F% Y} //namespace QtConcurrent
) V" v8 V6 z( Z5 p3 K0 t U# Y% }2 z2 ]7 c/ a% }- H4 M' Z h
#endif //qdoc" U' O9 L( u0 Q2 h! @" i
6 O# ^5 n# C: `QT_END_NAMESPACE# ~' B( b2 V6 w
QT_END_HEADER
+ J7 I5 ^ ~1 t: M; h5 Q! ~% j
- g# b, L! M, t#endif // QT_NO_CONCURRENT
, l0 j) N, \$ K! I
. s1 D$ _0 W7 _+ l- @+ _3 Y; |#endif
, K. s0 G0 Z7 G$ [8 q* Y: |, K- L# T+ Z# j% O0 z
|
|