嵌入式开发者社区

标题: 交叉编译问题,急 [打印本页]

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
, s: x# R$ S) R* c7 y/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' s# _0 @0 L: k' m8 c! S. ]
5 b5 o. O, Q8 _3 k8 X3 K# s+ U, W这个头文件内容如下:0 d* \* C4 t/ ^! k/ ~+ W( P5 A: z2 n
#ifndef QTCONCURRENT_RUNBASE_H2 Y, M) ^" {, v9 F7 G) h
#define QTCONCURRENT_RUNBASE_H
$ m, X" v& \" u& b! M' s3 y# H* K
# H! [" G2 B; Q#include <QtCore/qglobal.h>1 |8 C% ]. n1 F7 U# S

; g8 T. z8 Q! d: c- X5 O#ifndef QT_NO_CONCURRENT
. A4 q  Y+ f- @
3 R9 z8 \5 P6 v, Y2 B' |#include <QtCore/qfuture.h>
8 @. Y' g0 f! ]# c7 O% y9 S8 x#include <QtCore/qrunnable.h>1 w9 ^8 Q& T$ X6 C
#include <QtCore/qthreadpool.h>8 D) z% X" m" z
) D) Q! W! I+ B4 B0 }( A4 B2 a
QT_BEGIN_HEADER5 {, j8 x' z5 w7 }' J
QT_BEGIN_NAMESPACE4 @  z8 N6 @% m

8 k  ~" p! `5 h! c- S* O; M9 e* j6 d+ z0 PQT_MODULE(Core): O6 E# L% w  G* z3 E! T/ }7 H; v
: w# m- W6 O8 A+ d& o0 l* s1 \% r' N
#ifndef qdoc
8 X6 y7 [6 ?5 s* h6 j- c' q1 X% ~" l" B. Z' ]
namespace QtConcurrent {; ~$ R* e+ B8 l7 ^2 }
2 i' g2 q3 u# t
template <typename T>9 a* }4 A# g" @0 P' h" [  A
struct SelectSpecialization% W7 Y. R* Z! q# z; }# |  p
{2 ]/ Z0 I1 R! y9 y: A3 h
    template <class Normal, class Void>
- ^6 G1 K* X! {. G' i    struct Type { typedef Normal type; };+ ~( P; z8 ^$ F% x8 m: O
};
4 A' m6 Z# }- ~& |
0 w. z; |( p5 j; F6 h: v  f1 J: ytemplate <>
5 z' V/ W; E( S) m' t, a/ l- Mstruct SelectSpecialization<void>
/ x8 `: ?& _. a# T+ y{( Z, t- _5 @2 H5 K, S! ]4 m
    template <class Normal, class Void>7 t6 |! [6 E" M# R
    struct Type { typedef Void type; };
! }! `  G) f4 J+ [};6 d, L/ y8 U3 i
( M) A( L. V, \8 J+ w; ^
template <typename T>. T1 s+ w: l! {9 j
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable0 b! z2 l* j/ \! G3 b
{. `  Z. G0 ^1 p7 u
public:
3 E- d# C& [/ A( z    QFuture<T> start()
. n( G* n7 n/ D. u" ?8 k/ u/ d    {
! ]. g) I- @+ b* l7 [        this->setRunnable(this);$ p, ?- C1 I& T2 B  b0 ^: p
        this->reportStarted();
- f) [4 x; Z: I6 @/ W! a        QFuture<T> future = this->future();' B# r! A: V) I* Z6 _( @6 t  T
        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
' {2 `, ?9 N' l  S% H        return future;
7 u' f, O/ s& @4 W    }
# @3 h3 z; z/ j4 F: n5 i. I* S, U% ~0 c& u. k: |
    void run() {}
5 }# `8 b! S" `& q8 q$ H    virtual void runFunctor() = 0;
, u+ T( J7 X4 K# u! H8 j};
( V: R8 @9 i8 y+ U9 ?
) ^. W; U9 ~* \3 h8 t. R( U. N' P: vtemplate <typename T>
/ ?% V* T* n2 @* Fclass RunFunctionTask : public RunFunctionTaskBase<T>
# n/ B, v4 l4 E2 c$ D{
2 T# |0 }3 {$ c) X; Xpublic:4 ^7 _( e7 x! g7 n
    void run()  ?! H9 n+ j" c8 f, ~% B& k
    {, D/ F* Q7 R6 y& R" [. b
        if (this->isCanceled()) {
/ l& W2 `- H/ Y8 s7 r5 M5 A            this->reportFinished();" p; Y  g3 q/ G" r2 y. A
            return;
3 l* n* m2 z) ^* k  J7 l        }8 n7 u3 W8 L8 Y7 I$ ^' R
        this->runFunctor();2 T' b0 K' b, \  D0 d, K. y' y
        this->reportResult(result);  u  B: W! ]9 V7 k9 s" u! X
        this->reportFinished();- j& h$ O/ P6 c
    }
7 y& |) \! J: _    T result;
) N. t3 ^7 U! U- J1 j  W- _};
, B! f, X) z; S
5 I$ ]' a+ e2 Ctemplate <>
3 W- t8 X" i5 aclass RunFunctionTask<void> : public RunFunctionTaskBase<void>1 G- H7 V% q8 T4 k1 D( _' A, S7 f
{) b5 X2 h$ z6 i' F- l' H$ I# L8 U
public:
9 E% L9 x1 N$ j. f2 c    void run()
& X* A, ^) m( A' c& D    {# V+ g1 K* e$ I9 X" Q
        if (this->isCanceled()) {. g" S& Z3 M: t. b$ U
            this->reportFinished();! E% e  E0 k) l3 Q7 c: D% f& ?
            return;
; E  _. J1 X* N* F* r        }7 @7 _# j% \2 s+ Q4 h' s" m0 U
        this->runFunctor();3 n+ ?0 r0 x4 s" r# R
        this->reportFinished();: _8 w8 W& u7 q8 B3 c8 U5 [
    }
" _7 u( M2 x9 {7 r+ \" q# ~. x};% x. o$ W* v0 C
: p; i) O5 h0 }' |2 v8 |
} //namespace QtConcurrent5 ^- ~4 ]5 A; [# f! Z6 w
7 y: s) R4 i# a3 }$ z7 m
#endif //qdoc( h) y' |% T* G

3 w1 E, ^: |- `/ U: F8 PQT_END_NAMESPACE+ l& }5 B3 U% l9 Q/ q; O2 o! `" Y
QT_END_HEADER1 i2 M) S6 d) c

6 m9 _6 d6 ?! ~! \! n: b#endif // QT_NO_CONCURRENT1 Q2 K2 ]6 V/ s) o! c# V+ R
# m' c" t; n8 s$ H' z) f
#endif
* U+ U4 h  S3 }0 ]% x- @
' T1 ^) A& ~5 t* K# @. B0 C1 q
作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
1 v/ c( O! @- Z! J$ A& D, Y9 s




欢迎光临 嵌入式开发者社区 (https://www.51ele.net/) Powered by Discuz! X3.4