|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
( ?+ Z+ ]* K% P9 P/ N f/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'* i0 ?, ^$ s# T9 {8 {; V1 c
* l9 ^0 |" p6 K" W" n
这个头文件内容如下:# T+ W% @$ ^4 [+ t/ M, t
#ifndef QTCONCURRENT_RUNBASE_H% A; Z% {2 S# t6 [% ^& [
#define QTCONCURRENT_RUNBASE_H
- _4 Q0 n8 E( [( D; ~" I0 G" X% }" h# `7 O a; ?
#include <QtCore/qglobal.h>/ Z: ^& x# n4 `( w
; J5 C2 Y# s: f# k#ifndef QT_NO_CONCURRENT
/ d2 F: w, T8 Z# Q, x% c
5 D' z: t! s8 A: [+ T/ r#include <QtCore/qfuture.h>
: J4 r. O6 k- o7 C#include <QtCore/qrunnable.h>
: I7 [" q. O2 @ s: k#include <QtCore/qthreadpool.h>5 }! c2 t2 W5 H D
9 X" |8 R, u" T2 C* i g
QT_BEGIN_HEADER
0 Z/ E2 S# V5 }; G% r# VQT_BEGIN_NAMESPACE) P M3 |* j2 p
& P+ ]! c, _" s4 s: t) _* P" ^) dQT_MODULE(Core)1 [0 E) M1 m% m4 w' h2 r
8 `" u! l2 s5 m8 a#ifndef qdoc" N: w( z3 |2 H; Q
- I$ w0 L5 k* W- `! s y
namespace QtConcurrent {- @+ Y- B1 K$ Y& Q1 N8 b5 w, u1 A
8 l8 p) O6 k- X Etemplate <typename T>
6 K3 V1 L/ b7 ~7 istruct SelectSpecialization
' F: p# H" F% D! v0 l{/ m& I6 k# P4 \3 t- g
template <class Normal, class Void>
2 A" q/ w8 g: @6 `8 \ struct Type { typedef Normal type; };
( X! j' Y* g$ |};
8 ]0 u' e# X4 q! _- S& N5 b' e2 c9 Q6 H" D {
template <>5 _5 {4 x9 C; y( r# t
struct SelectSpecialization<void>
. G$ N7 {* v+ ^7 b( v{* v! n( r" A- x2 ~! X8 x
template <class Normal, class Void>
' o) p5 w3 u0 U% Q; d& P- |6 N struct Type { typedef Void type; };
0 w: @ c3 S4 Y/ s8 }% l# k};
( ]- }7 ]! R% i$ X u) K
6 e% f- ~, K9 O& }" ~template <typename T>
7 Z9 q! p; {8 |; Z7 Q5 g2 G) bclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
{3 y( r- l# B# `. w( A2 ]% U{; U7 z) O* H' {9 R" z
public:" u8 q# t( j+ E- X" W) y. s, P
QFuture<T> start()
1 x' ]+ y; V% {6 @/ [( g+ H {
/ t9 U5 \( ]5 v9 H- l. }- @. z/ O0 ^ this->setRunnable(this); l P: V2 ] q( e* Z9 s9 j/ T6 \" J
this->reportStarted();
/ R9 z" {8 f6 W# H# f QFuture<T> future = this->future();
4 m4 C1 Z4 J# ~* u QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
* t% u* f( m! c2 k# N return future;3 a3 c) R3 G. y) I
}
6 [1 @0 c- ^) k5 }7 C( s* G7 M
6 `2 b5 ?9 U% Z1 V; A+ s void run() {}
& ?+ \) q9 Y; u virtual void runFunctor() = 0;( @! W& K- z, e. _
};6 m; J& K$ e1 K0 G- q
5 P( y& A) D$ y: B( g0 ~
template <typename T>* @4 ^ x" x6 Z3 `" B2 F
class RunFunctionTask : public RunFunctionTaskBase<T>7 {0 u+ A) E; |. K* Q& `- N
{. _7 `/ k4 Z1 ~$ V) J' B/ ^ z- ]
public:3 m" F9 J# [+ Q* W3 s1 _& H
void run()3 ~) v" i" W+ ?1 b- E3 g
{' C* B/ Q% F" o' z) T& V( |5 M
if (this->isCanceled()) {" m9 w+ \7 T# J
this->reportFinished();
7 q) w6 v& |0 A0 [ return;
0 W9 r) m) D& G1 I$ w% S9 ^& b }6 L6 H J9 ^5 p' T& t
this->runFunctor();
( B9 F' J* L0 {9 u0 Y this->reportResult(result);' _7 ]! t/ z" H$ t3 A' _8 j
this->reportFinished();
8 V; n; w- u$ u8 O; w" a }
) @/ K9 W0 p S& q& @ T result;
; ^; E. d/ O) C};/ z* Z; Q2 t; O& M6 X) ]
% }* j: l3 S1 Ptemplate <>; Z2 d d6 b# o: }* k: n
class RunFunctionTask<void> : public RunFunctionTaskBase<void>) H% P8 O7 S: V4 D, V p3 u
{
5 {0 ?' ], \ o" t4 v2 k/ {public:9 F/ d8 ]+ f) \
void run()
; J! ~7 H1 L7 p& E {
3 r- c+ G1 l, \% @/ Y/ E/ a9 y if (this->isCanceled()) {3 |8 w+ e! g$ Q/ h/ w+ F6 S
this->reportFinished();
0 V2 P/ B" G; f, h2 B' x return;7 v( J% y% p( }" P/ M
}" I7 L, m. H$ `$ i- f
this->runFunctor();# m) |. c9 q( H- I6 }
this->reportFinished();4 u }5 C3 {. z6 j
}
1 m, z( K$ e8 W$ N3 o" `};
) K, M3 _: u4 G) r7 t6 Z0 t+ l, D5 R3 x+ u' P% r( ? V" {8 H7 C
} //namespace QtConcurrent
) P/ [6 d( G4 }. I+ s, d1 t( k1 Q: O% y
#endif //qdoc( _4 n3 ]0 |* F- c
. \% A2 h* J) o8 G& ZQT_END_NAMESPACE
+ B, }+ W/ l% `. Q6 zQT_END_HEADER
5 D& N Z/ V, b! u. G1 m0 P) W; O$ T S0 V) K
#endif // QT_NO_CONCURRENT5 P* U( ^7 x- q `9 E9 R2 h- E% l
& K' [/ W- m6 `" |" |
#endif
, |) H/ U `. X3 b7 } F
* k+ K. r! ^% w7 I |
|