|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
& t! }- t! A& {+ K. [: E/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
K( i0 w7 T( z7 [0 B* F/ h4 R0 {& H: B/ l) V% o2 X' C
这个头文件内容如下:, `, a9 o8 }- @ m! b
#ifndef QTCONCURRENT_RUNBASE_H
9 W1 g8 @6 v5 E9 {! i/ n# y#define QTCONCURRENT_RUNBASE_H
# }7 V/ Z7 t0 D. ?4 `. e: | L) p- ^* M2 ]" E) J$ ~4 o7 A9 X* V
#include <QtCore/qglobal.h>: A$ ~! E# z! ?% L5 u+ Z- G
6 U4 e6 A" N6 D/ j2 k0 T+ K5 m
#ifndef QT_NO_CONCURRENT+ }4 A& |% Y$ P4 ]) q# k$ S% b
: J7 x0 o2 w2 E# n8 {5 M! ^
#include <QtCore/qfuture.h>7 A D, a( l% q% [- t K
#include <QtCore/qrunnable.h>5 r3 x% m7 |1 E. u
#include <QtCore/qthreadpool.h>
$ C& w4 D: ] }" }& y) j( a5 w1 X0 R" }
QT_BEGIN_HEADER) T# b0 ?' z; b
QT_BEGIN_NAMESPACE
, W9 |4 d$ g: J2 Q
* N4 ^9 ^% d6 w/ w2 |6 v& q; ?" yQT_MODULE(Core)
2 h& P3 v& i2 a. N) P+ d4 T' c& F- H3 v) M, y S
#ifndef qdoc
/ w$ H$ p( `8 x1 }) L; x- Q& N% j1 K3 G" I) D
namespace QtConcurrent {
2 d4 D6 r! j/ g; O, H2 p& d" j$ ]5 M
/ u+ e2 U; I, X6 ytemplate <typename T>
; ~5 { g( r9 F, Sstruct SelectSpecialization
; ?& q7 ?1 b& V/ ?{
' W/ W( b# ~9 H6 w7 y# v! h# j, q template <class Normal, class Void>
# h; f3 L: n$ N' j' |. x8 T struct Type { typedef Normal type; };
' d2 R* [- m- A6 D! A9 m3 X8 `};& A5 O* @% g: g9 r) J R
" X6 Q9 \0 J5 t( N/ V% d4 mtemplate <>: H5 j& G- w9 H5 Q3 ?9 ]! K
struct SelectSpecialization<void>2 s5 }; Z% B- @/ w, S7 Q6 Z
{
! F1 U ~; `1 J5 @* m* f template <class Normal, class Void>1 V, [! A. C3 ?3 Q. i
struct Type { typedef Void type; };
3 f9 Z. `: k% b s& k H3 A. O};( r3 h3 e; W; | Q, H! {3 E
: ^# Z* ~7 W0 o6 Y; `! `. t2 [
template <typename T>
8 v$ ]' b' Y) H* xclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
4 L/ G. L1 ]* b" n ~3 ]0 s& n{
0 p- _6 o) J6 x4 s; tpublic:
6 p4 c' r5 H' l3 x; J QFuture<T> start()
6 X, H" _7 c" X7 {3 r {% q, x- _( ]* ~" o" }- {0 L
this->setRunnable(this);
5 h- F7 W# Q& ~ v# N this->reportStarted();
3 o! p& T$ c* o; G0 E QFuture<T> future = this->future();
) k: a- i; I) j* x; l8 N. d- m* { QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);! P+ d* }" \) p/ ?
return future;
+ C3 ?9 M% Q! g/ |3 H }1 r/ ]# V" S3 ~6 U ^
3 `- z! y& d6 @( R7 u+ z( T1 n
void run() {}
! I. W! B' G% y6 \! z) U5 R virtual void runFunctor() = 0;
4 Z/ o/ ]) \. j};
# U( Q0 j1 i2 o! T: c
4 P* q1 s, M( r7 Ptemplate <typename T>
6 b& R1 l! Y+ Qclass RunFunctionTask : public RunFunctionTaskBase<T>9 }) m0 c6 @, \, s6 [% [
{. r8 ?/ g) M7 T. j/ T. B. T) e" B* g
public:
0 [* W) S* K( o V void run()
8 U4 N' m. _* C {
" L4 m+ U. y: x0 E5 Z1 y if (this->isCanceled()) {
. Q3 P2 M4 m0 e: h: d1 y. O7 H this->reportFinished();
/ u( O4 u4 V% |; g5 C/ a* w return;
" i; l( H! d5 ?% `/ K& k d }
, N' G* A, ?" Z+ V this->runFunctor();6 [3 Q6 c* N: }( V( [# U- R& E* E" a
this->reportResult(result);
2 r" R& J( b( \8 _ this->reportFinished();
- t: Z. L( `! M6 } }
6 p) r; D* }/ p0 v* v, w n T result;
( D; Z0 m: S+ E# g% F6 j0 z};
2 h1 a. s0 O6 J' }1 Z# S# f1 d+ N4 l. U' A3 I
template <>& T1 A8 q0 r5 g5 e
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
. ^! S* s z# {8 b1 Y7 ~1 n8 m{
; {! {: A0 o/ U2 z7 p$ Z1 ?3 tpublic:) K) ~. i: C7 ]6 { {+ b
void run()2 n$ J9 R' B) \: E2 M1 a" ?
{
V) ~, Y- e$ h3 G if (this->isCanceled()) {; J; H8 X X6 j# S5 S. {
this->reportFinished();( o) I, M' O4 |. c' h
return;3 W _6 J3 w; G0 p( {
}% J& h% @4 ~1 o4 M$ I9 Q
this->runFunctor();
& }5 t0 f: t# {$ ?8 L. L this->reportFinished();6 f; R% [ j0 [1 F# J) j9 j
}% x5 ~* ^1 I& p
};
" `2 @3 j/ P3 h1 w* W2 v: ^1 c3 `- Y9 Q( Z0 e( D9 E: ~; I
} //namespace QtConcurrent; @, U7 T# ^- ^6 e: X" Z
6 c" h4 s7 ^9 Q' E5 A
#endif //qdoc z- | {' L! b2 {& D1 N+ b
5 f2 z) p( U+ o `7 u' q+ D" G+ MQT_END_NAMESPACE4 |# A! D& ^- t! F$ p9 `' A* b- [
QT_END_HEADER: _0 P7 K, u7 ]9 y2 q( H5 k
/ T4 ^2 A' K" j; ]
#endif // QT_NO_CONCURRENT
3 G+ a' t8 ~+ z: k5 p, y! \
3 H% Y, R* ?( [* y$ \#endif9 _) d" s B3 e9 p
- E, f. z, P9 [, S: q |
|