|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
6 J. [' z0 c$ n* z/ D6 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'
f# J; Q* K$ [1 ~/ d
) i% ^$ a' E7 _( s) P这个头文件内容如下:6 S* H# Y& G0 f. l
#ifndef QTCONCURRENT_RUNBASE_H# n5 N0 B2 O0 D5 c5 Q1 O8 E9 E! b
#define QTCONCURRENT_RUNBASE_H
$ B% y9 n9 e, o' B7 E% B" z9 T8 }5 V8 @" m$ J7 T, }
#include <QtCore/qglobal.h>, @; Y! x5 u+ L7 Q' p7 R3 k% ~
8 v( _) W d6 J' o0 \
#ifndef QT_NO_CONCURRENT
7 S2 ~& Y. Q( I' l7 b' ~
# e. s" V0 n. U3 U#include <QtCore/qfuture.h>
5 z+ S9 w u, v$ T8 t1 I7 K) U#include <QtCore/qrunnable.h>6 v# e# _1 y/ E; U3 y
#include <QtCore/qthreadpool.h>
5 u7 X/ Q; C& o. J% |" c: g! h$ a) I6 T7 `
QT_BEGIN_HEADER
* |8 R2 T+ l% \2 MQT_BEGIN_NAMESPACE5 c" ~, j' V( S6 |' z& q3 m
2 B/ O6 [7 ~/ F" F0 j6 U! S. F8 gQT_MODULE(Core)" _( Y( ]5 ] V# Z$ k: l
' i3 D4 F) z5 B#ifndef qdoc- C r+ W9 Z3 L! l' n
$ w- B; V) E' d1 t7 ~) r3 ?namespace QtConcurrent {
; m) v4 B8 X4 `4 F6 s; {) H" R O
template <typename T>2 M2 C4 c8 V( T( ~
struct SelectSpecialization
3 h& H3 V! Y% }. E/ K7 P{6 G, k A! P8 r e5 E! `0 u
template <class Normal, class Void>
2 ?& d, f/ A. s& V struct Type { typedef Normal type; };# i8 P+ E! s: `3 B3 H
};+ |. g- _6 l, S9 \$ R# L7 l
/ B1 x# A/ n" e* @' Jtemplate <>% D Y+ _: m8 \
struct SelectSpecialization<void>
7 g% G3 O1 t9 A{
/ j5 i, x, q4 H) j& b7 Y template <class Normal, class Void>2 |# e6 r- s# I4 V
struct Type { typedef Void type; };8 j& Z- z5 s# u5 D
};( h: x) C7 Q- u
8 L- A4 K" ~5 i3 Htemplate <typename T>& }- @( B T. N# [) {
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable/ @$ [9 I/ R7 @# {
{
# \1 ?% t. g& H" ^& g! m Upublic:
2 C- H& S" W# v' f QFuture<T> start()1 B: {, v/ J' ^5 ?5 D- R
{
1 @$ W) q3 C" E5 j% b3 N8 h, P& e. | this->setRunnable(this);
V9 k" ]+ x9 X2 G( ` this->reportStarted();" a; x; M. b: ?. J$ S1 T; P
QFuture<T> future = this->future();+ A; W* u1 Z: c* |- i7 q
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);* o4 a7 @% }# I6 i1 ^( t. {
return future;- Q* Z0 B/ |# P! J
}. t C0 P8 W! t1 ^
/ u# H6 s- H' J, U: K void run() {}
' ~3 i' B; A( L7 V' I- C virtual void runFunctor() = 0;& T2 J# r1 W/ u: u+ D" H O
};
' _. r6 l4 K* ?/ Q$ f6 ^- S# m7 P3 D+ R f2 V: C+ X
template <typename T>
! s1 j# l6 D7 R5 e4 V+ sclass RunFunctionTask : public RunFunctionTaskBase<T>
6 b1 c6 [! x ~4 \/ X{8 n9 f) t9 I3 q9 P* s
public:
- K+ ^1 n" |2 g- L2 k void run()9 Q3 q" m0 \" J9 t3 _
{1 q2 p( [3 D) c) m" R% ~3 c, I& F
if (this->isCanceled()) {+ Z8 X! n q8 Q7 w1 _
this->reportFinished();
% W3 e* I8 s! P- U return;
; c; H# x# _; t }
* a# k$ z `8 N3 _# D! R this->runFunctor();- } }: M/ c. u6 a! X
this->reportResult(result);
6 Y! d9 u0 c% h: }+ A( g this->reportFinished();+ _* b5 q- d$ o" \0 @' U! N
}
) u9 I; D! I$ I9 h$ s T result;
3 P# R- t+ q, |' O9 Z/ s};1 ~( ?; e4 u; i6 l8 I. W
1 @6 ~3 F7 Z' gtemplate <>; \" c8 ~' n4 f/ [4 z, ]
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
- p5 }* B( Y1 C{* K6 q& X! ~9 }! M' v& r! p9 ^
public:, M+ {$ r! z* Z0 i1 x: J1 y' ^
void run()
, c6 X- Y3 g8 E) {( T6 a: a4 s {) s g7 V' W6 r6 ^
if (this->isCanceled()) {
5 W# a% q/ W* S5 L- @ this->reportFinished();- x% g5 E# T/ H
return;3 ^: z1 K' O2 z
}. g. N, N6 b! c' y
this->runFunctor();
) y0 [8 S+ F# Z& l. W3 ?$ Q7 i this->reportFinished();, m2 A( m/ ?3 Q8 l8 C6 M; s
}
2 O" m6 ^7 H' c1 j' H};! t- C0 V4 Y4 ~3 Z! H, x
! ^+ ]: i( G( E5 e2 Y' h" l% q} //namespace QtConcurrent8 k9 v6 |& `6 t9 m" t& ]
' b7 M3 [ y7 x
#endif //qdoc
3 m1 t1 u6 x4 O4 Q1 \! R3 L- J! U% j, T& c+ [# I. F& O: C
QT_END_NAMESPACE
1 R! c8 U# \7 u! ]. }3 X/ V* P# Z8 pQT_END_HEADER2 ?+ O; V( i$ e) X: }) z, }
3 T6 j/ w$ c3 O" f7 h% u3 b u7 Z
#endif // QT_NO_CONCURRENT0 \' s- N7 W4 X+ K" c
' |& J) N: Y d% p
#endif2 ?9 S0 A0 b1 K( h4 k! e; f1 q, r, n
5 u1 {: `9 W+ R+ M |
|