|
|
我对syslink进行交叉编译到arm,但是出现如下错误:
* A5 M: p/ G5 l% b6 L/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
- Y+ z v% f' @- J* t1 ?5 ]) Y7 ?% d, e2 C% I0 P7 T
这个头文件内容如下:1 C* V9 z B/ B& w \9 |
#ifndef QTCONCURRENT_RUNBASE_H
3 p: x! P7 T2 E2 |. m/ x: V#define QTCONCURRENT_RUNBASE_H
5 u6 N" ]- ]; k8 S9 w4 y' s
) ^+ U$ Q( u; A* k#include <QtCore/qglobal.h>- `" \+ m& J/ i$ O+ f
: g- ?2 A. J* U/ F# \% c: c! X
#ifndef QT_NO_CONCURRENT$ U* ~2 w* f, I& h
: n/ f8 ^, C+ x! g
#include <QtCore/qfuture.h>4 ^* `* s; S6 ?; O9 ~4 J+ Z- m6 J3 J
#include <QtCore/qrunnable.h>' K( d" N: ^9 c1 f
#include <QtCore/qthreadpool.h>
5 i! A: W: p8 n: F) z* r9 u' t1 q3 A* t0 I" x( z
QT_BEGIN_HEADER' E- P+ E& K; {
QT_BEGIN_NAMESPACE& w) ?& Z# K) \5 Z! n
7 y: A$ Y* U* _7 j5 {QT_MODULE(Core)" z' X9 G9 n+ W0 H/ \6 K, ^
, N. V1 {: N- G( E/ i6 P#ifndef qdoc& V* u$ ?( y+ m1 I/ @
4 I( _/ f. h% X, ^4 W
namespace QtConcurrent {
- }% Q' V% y3 j7 N$ y
e3 T7 E! m: e# D; x" ^9 C1 p9 ktemplate <typename T>. y4 c8 V# M9 M$ c
struct SelectSpecialization
" c3 r6 h1 f: u; ~6 s* q{
8 D5 \/ K% n7 D1 h, I } template <class Normal, class Void>
# _9 V2 |$ P8 T9 Z! b6 m struct Type { typedef Normal type; };- M4 O- q$ G8 Q! B# m8 `. r4 {
};, q; l- F2 V- o- }8 w6 p2 E
6 Y2 W$ A2 v& N, X# c+ P$ _0 R
template <>
2 F0 E- E# {" {0 S% p" Hstruct SelectSpecialization<void>
6 z# i) D" m9 O; _{4 K% s. j! D; W0 {) P$ [
template <class Normal, class Void>( {2 m/ g/ @! x% `7 g. h
struct Type { typedef Void type; };
* x& W# A- K* c9 g: H# w( p};4 q4 \ I: m2 r9 n' ]
4 z9 J3 z* H; m, {$ U
template <typename T>1 a$ a2 z9 U* N* [; h5 K
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
+ Z, n- T6 F V) h0 S/ i{
" t8 {9 ?. W. w& E( L9 Apublic:
- S$ G* o0 L- v F, c: p' ~; ]8 V QFuture<T> start()1 C+ s) B$ H! A* m( }
{0 p- Q4 {7 i/ z* U, U, b% D# W
this->setRunnable(this);
% E3 V( e* ]- @* P0 O* Z this->reportStarted();
( R/ j: l. ]: C( T- D QFuture<T> future = this->future();: d2 P6 f o* i/ j3 F
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
( B- c. U/ \& I! a3 T( R6 j return future;
; r$ K0 `8 e% Z% r% O }/ D. j; [# V I: }
6 P7 v$ l7 b0 k& s void run() {}0 |/ }/ ? u4 v, f |: H* b
virtual void runFunctor() = 0;
2 {5 A7 {+ ^: e, t5 {8 v- K};
2 [. c" X* T, g d. ~9 ^' q1 r, }- X4 q3 T8 [' M
template <typename T>4 C' u4 y) ], ?$ x2 f
class RunFunctionTask : public RunFunctionTaskBase<T>- ?& l* W& i) Q# c
{
4 o+ K0 ^8 w! v, P# m7 qpublic:4 H5 Z: b& a: L0 ~2 h7 f# S
void run()6 _# j. c2 w" q" \
{) ^) {8 u9 u- ~% X
if (this->isCanceled()) {
5 `! L- J3 W, m; B! Z this->reportFinished();
! D8 h; h/ j) } return;
- L% A* i: ]) F5 c2 `( N# t }4 |3 h& H+ [5 A, U
this->runFunctor();
4 t0 ~2 I6 G, |% N9 A) Q this->reportResult(result);7 z& T* F0 r7 `; D$ ^- O
this->reportFinished();+ a& P7 Y5 m0 u8 Z5 F' N
}' }8 g4 Y h3 B2 _" n+ y
T result;+ \( d7 K5 l$ `2 u$ d. U. z
};; }2 ~. h4 T" m+ ?( s6 P
; q; \, C" B0 y; l' ~template <>
8 o/ ^/ R; h$ ^class RunFunctionTask<void> : public RunFunctionTaskBase<void>) D) b* A( ^1 `2 |" d* T
{
& Z/ v+ c3 Y5 B6 ypublic:
2 F+ N9 H9 B$ d9 } void run(); w! w0 O9 ]& D$ M7 l4 C
{
" j2 z8 s* f* G e% ]/ T, x: s# v if (this->isCanceled()) {
5 B8 Z! W4 k2 E: [0 g7 Z3 d1 }' i this->reportFinished();
& w' R% s" c/ J! e3 I return;
* A! K5 L8 d- a/ X1 B }
; F6 L% N, m/ N7 }% ~, G' b$ Y this->runFunctor();- y; k. A, a+ \* ]: T$ `- U1 m
this->reportFinished();
! v+ i& {) g4 \0 o$ m2 f3 c }
5 v9 z# O. h% |& y) N, h+ a};
$ X$ v6 ] O) V0 J# J) q4 b2 |) v8 P( ?: J# m' K
} //namespace QtConcurrent) v) q% S+ j0 T' I8 Y
: F6 u; p) ?; w0 T, r/ A1 W5 c
#endif //qdoc
- A. }( Y6 X) J9 G. b- e: A T, Q9 M0 p
% e% w. r, ]% `+ ]* A+ I1 RQT_END_NAMESPACE5 W6 `& y9 t6 f, @5 g% u
QT_END_HEADER
- A; a: S" D+ t, \2 v8 \/ e3 K
# o8 [5 B# |+ F& d ]4 r$ w#endif // QT_NO_CONCURRENT
6 `7 |+ C) d3 l* P5 v. _
- q8 P" Z. G0 S- g0 s! o+ `) Q7 l#endif
# K- o) M& w9 D+ C
1 o# V/ F7 e, q' z. D+ C' t3 P; z |
|