标题: 交叉编译问题,急 [打印本页] 作者: smallknife_hb 时间: 2015-1-12 14:22 标题: 交叉编译问题,急 我对syslink进行交叉编译到arm,但是出现如下错误:. u8 C. M" V& t
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'8 _/ M" ~3 }0 |; G
/ J" Z- T: @9 ^7 |6 ^ L这个头文件内容如下: 0 T9 U5 L, M$ v* s4 S. h#ifndef QTCONCURRENT_RUNBASE_H 2 `7 l ]1 e2 ?6 ~/ X% G#define QTCONCURRENT_RUNBASE_H5 M, `9 O k5 x
% \( h8 ?% o5 p/ W" z2 B4 s0 u; o& c
#include <QtCore/qglobal.h>: b: \" S& A# ? N' A
# f$ ?( b) ?1 V. c! C#ifndef QT_NO_CONCURRENT5 ~. ]# x6 b7 C! T F4 u, x: C& {
# o9 Y( \$ ~1 w* i( X) x0 v#include <QtCore/qfuture.h> ; I% L2 y- C: |3 Q5 o4 ?#include <QtCore/qrunnable.h>* @2 X0 a/ T0 |! ?- n# @
#include <QtCore/qthreadpool.h>8 D& D2 Q% [4 x- D
# `! N7 I v: O/ O
QT_BEGIN_HEADER: Y; K3 h" ^0 F3 V9 u( A: D3 F% l! o
QT_BEGIN_NAMESPACE) S9 S5 v& x _" p( H. R; ]: F
2 X( J5 W" A" a9 pQT_MODULE(Core)3 ]: w, `/ b6 P7 ]/ B
. W. G* m0 v/ P7 k. I
#ifndef qdoc - J3 V; P/ a `2 B/ ]; l1 |* M" i# \
namespace QtConcurrent {8 J8 ~0 t. e% H/ }7 X" i$ \
+ o1 a, X2 V! C- k o! p, [/ X" etemplate <typename T>9 Z# ]9 {- U4 Z) @
struct SelectSpecialization5 B& q% D1 z0 y/ T
{ 3 \9 z* M/ _# A9 X3 K template <class Normal, class Void>8 R$ \" V6 f0 ^( s7 r7 \
struct Type { typedef Normal type; }; * U* z* d2 Q6 r6 i( |" G}; g8 T& H) D) p! i, v! o1 i3 S) j$ @4 K' n- x; T" {
template <>4 Z: i* y8 T$ T2 {1 K! I
struct SelectSpecialization<void> u4 D& A0 d0 M5 o! W{9 ]3 ?! K, R# t- D1 I2 r1 G
template <class Normal, class Void> " p7 [* c3 r7 h4 }+ S struct Type { typedef Void type; };' {. \! ^' k: z- u8 c# G
};$ U! G# f* S3 H1 L
1 k4 `4 R% B# Q* M( Htemplate <typename T>) E, ~5 i1 Y4 [. j6 \, E: V
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable 1 r+ m- I" T, O$ X( P{& M/ T' G" N4 Q0 I: }/ R8 s( Z
public: 1 P* y' _$ ?/ { QFuture<T> start() % Y3 G/ [9 e2 z: y# V9 A% U: S { 6 K4 T# {* U( S% W this->setRunnable(this);$ v3 m( o% d7 U. J$ `1 e) Y2 I/ ^
this->reportStarted(); : \, E6 J. Y$ Q QFuture<T> future = this->future();% Z1 p$ m- Y1 }# c3 B2 e
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);+ d7 @2 n) C/ I5 a
return future; 5 p, s- Q& v8 C- |; ]% X } : ^; O7 e$ p- A, i a9 o# `/ k- \# H
void run() {}: a( D. \+ P9 n
virtual void runFunctor() = 0;0 x* z$ T7 y# x5 t- ^
};- ?. @, T" x# y# H
6 F9 p! e" ^* l/ vtemplate <typename T> ' C S4 j, s3 @5 J( mclass RunFunctionTask : public RunFunctionTaskBase<T> j4 c/ h5 _7 _( {$ T! Q4 `2 l{ ; c/ ~' J; J0 Q5 v; ^public: % g# m3 m# u3 s& U void run() ' M+ `; U0 B6 B1 z9 J, e/ H {& Z, G! O6 t! w8 G" v6 P# F5 W
if (this->isCanceled()) { - O ^! J9 V5 R2 b3 y# B6 ^2 u this->reportFinished(); L$ t9 F9 }% t& n: r return; " d9 ^+ k+ q+ N6 u2 b }. {% A0 n1 s- H4 K3 O/ v
this->runFunctor();4 n, U4 D5 E5 G+ d/ F& e( ~5 ^- j: e
this->reportResult(result);( w6 C, G' y$ E( V2 ?! `
this->reportFinished();( ]) x1 K$ m- ` |9 P* T0 P. R
} 1 }6 S" R- O* X/ z T result;; ~' S" Q- ?3 _1 F
}; 6 ]. Q" h4 ^* i; ^/ q9 J& B5 R2 I$ m
template <> & D5 x, {1 [3 F ?* pclass RunFunctionTask<void> : public RunFunctionTaskBase<void>, d, }# f+ _5 P, E. h% o
{, Q2 Z4 l6 b5 D# H3 F1 g% W
public:& Q+ f& M+ X# e
void run() ' [8 k! I. K* _- b1 j% o" F { 8 J$ J3 \! }% u) n2 u if (this->isCanceled()) { . D6 {+ z4 z6 I9 N this->reportFinished(); + |) |6 w& v% A" J return;. ~# S, l ^8 H1 d( C$ ], \
} " u% ^; O) h5 U' x this->runFunctor(); ' k4 A* P* | w7 M' H+ }- g this->reportFinished();9 {7 c; ^6 P! D; _) u
} ( _- o* N T/ s! b1 }$ Y}; + f/ R3 Q, W5 s$ f0 Q, L. X' z $ t* |4 O0 G: z9 |( i O4 A} //namespace QtConcurrent+ [1 C& F) Z8 ~1 r- M* H