|
我对syslink进行交叉编译到arm,但是出现如下错误:0 b% k) S" z0 n7 c, P
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
" \' ?! d" Z) R& t X( j8 m% f$ }" N' s4 U
这个头文件内容如下:
" ^3 e W2 t+ m( K. n#ifndef QTCONCURRENT_RUNBASE_H t4 r% M3 O, y& @2 L% E, T; ]
#define QTCONCURRENT_RUNBASE_H
9 ^) H8 c7 B* ?' H6 d+ B
/ }. v! w3 l& S, \, T ^#include <QtCore/qglobal.h>7 u$ X* ^! I7 C
1 n1 |5 }- v6 \! H, z$ ?
#ifndef QT_NO_CONCURRENT
$ H+ L8 M) Z: P( m/ D. r4 Z( e4 M" Y2 `
#include <QtCore/qfuture.h>
) h) F2 _2 C0 o#include <QtCore/qrunnable.h>
! g/ R& N4 k1 g: G#include <QtCore/qthreadpool.h># V. U7 f1 j/ @" h
/ W7 ^! n; M8 C+ \
QT_BEGIN_HEADER
: c0 m1 }1 s; Y. f$ x+ AQT_BEGIN_NAMESPACE
, W6 S( L, D6 I% Q0 ~; M" K6 A M0 H# E2 g8 E/ [8 |' {6 \
QT_MODULE(Core)+ |( c+ Y8 Z0 u+ h
1 u9 g4 P" F% o* `, u( o
#ifndef qdoc; a# K" k0 U" o5 ` U
# h7 p6 s! U. m. }' x; X* _+ U+ Z
namespace QtConcurrent {9 T: m& |2 r% ~3 G9 X, P0 |4 N
" z9 |& Z& |) {* l# D4 D0 Utemplate <typename T>
5 P9 _( g) E, w5 W9 c& u3 sstruct SelectSpecialization
1 ^& |" @, E) L7 n, a3 b+ m: v7 ^( F/ |{$ a. E# m9 C/ B) r7 n
template <class Normal, class Void>" w6 |! ?; x- U) K( }# O. f
struct Type { typedef Normal type; };$ T+ `9 o# G1 |# f D. o
};
" z" f3 |5 u. K, m. @' K! s8 D R; x0 w+ H
template <>
$ R8 R0 u6 e! c* Z" u; W2 hstruct SelectSpecialization<void>
6 d7 ?" O3 W7 ]% S3 f* d7 G{* {3 W4 \' r8 U/ |
template <class Normal, class Void>
4 g. k n. O& ~- x. D5 d struct Type { typedef Void type; };" s9 O- s0 E( F0 c: Q" j: {0 x
};# |3 P1 q" _6 j5 H
7 C! v; p- O2 w' x! a
template <typename T>
$ T0 ~ q8 T: M( oclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable! U0 \- ~/ p3 o2 q
{
8 S3 m4 ~/ C# }( O# ypublic:
$ z6 I8 c% Y1 Z+ e- G5 S! v QFuture<T> start()
. B# l+ r( U6 K b: M/ ` {7 b V) f! r/ A D0 U8 `/ D- R
this->setRunnable(this);6 b! s$ ~' }' H: A* t, ] c }
this->reportStarted();
4 o* n; r1 N( C6 @! s QFuture<T> future = this->future();
, X: j4 h% U# ^6 M9 F4 M# l QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
. ^3 \( a; a- `" i% N( ] return future;
5 Q! d) `# i. P7 k& X7 n* A }
, b- t% U4 P# u X$ s6 ~' |, B. f: {9 Q( }
void run() {}
' X2 n4 y5 W" q virtual void runFunctor() = 0;
% v) c: o6 f* F- W$ ?};
2 ^6 R- z% J7 b
0 W' J6 F7 t. s; Rtemplate <typename T>' G0 n& R% b* k6 m+ Q
class RunFunctionTask : public RunFunctionTaskBase<T>
7 L+ k7 Y4 h5 b; G1 ^4 F- E{
1 l$ E8 U- W# S, K5 H! U5 g3 T# Jpublic:
; i: M# Z! U8 c4 U4 ? void run()
$ o! a/ v% r# O/ Q: g8 b; h' S9 N {. c, ~/ O1 `! p" j0 D
if (this->isCanceled()) {) V: \( t, N5 [9 L
this->reportFinished(); s4 n: W. Y1 a7 F. ?6 O1 e
return;
" [; j$ l# [( ~/ Y }
7 A9 r g- c9 Y4 ^ this->runFunctor();% A* i7 [- s4 @! b5 g) ^0 L9 g
this->reportResult(result);
/ K" m4 Y0 t* O$ b6 c/ q+ l this->reportFinished();
% O A5 |2 |9 u$ R }
- f) O$ Q4 c: ^9 M7 D5 J! i T result;0 q% v; C f5 e; i, N6 b& L
};
1 r" y( U, r. Q3 I2 y- U5 @; Y0 S; `1 s
template <>8 V$ O7 j$ j' S) Q
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
$ t1 z0 A8 f( c* |{# N3 `, w! ~# c0 t. M, N
public:
) M- Z& H! ]9 D8 |1 V4 H void run()1 w5 \6 _3 q- H4 C
{
3 x. L; `/ S) Q3 {& v if (this->isCanceled()) {
% a6 Y8 k) d# p3 }) T* q( J9 h this->reportFinished();
# G' u, t( A `. E. \% q0 E( | return;
8 n, a$ ]' _) {& @" h6 x7 z6 \. ]3 m }
) A/ [: @# t! z7 W this->runFunctor();
# x9 [6 d8 ?: X4 l' e% o this->reportFinished();
& M9 Q5 H. ^9 h2 C5 O }5 s1 }$ w/ s( A' Y2 w3 k3 Y" K
};
8 N" ^! t; j( n4 [, F# C) W! Z) Z7 @. b* Z$ \% C0 ^) n
} //namespace QtConcurrent
) M/ b, m; I: @/ z8 i6 b, b. q) L7 s2 p3 I2 b' E3 I& r* V7 g
#endif //qdoc* w: E' U% y( {. v, n
) n9 e8 g4 O7 A& q2 BQT_END_NAMESPACE
|% Q" U, Y7 `& f6 Z3 _1 y. n2 qQT_END_HEADER, ^2 H$ p. G4 q2 R5 l
% d+ ?3 o3 V0 }% x& ]+ N8 w#endif // QT_NO_CONCURRENT$ h, C1 J: v, w4 e' G9 Q
! {, ]" p ]5 t! ]( v& Q0 F#endif
9 E0 i' {8 }5 D/ y
8 }. m8 ?$ s X. z |
|