嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
6 f5 s' B9 L  @3 ~: i6 ~- V/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
0 I' U% ~" r7 `/ I& f8 j! I- C, v# j* Z, w% B7 O1 C6 l
这个头文件内容如下:
8 i5 b9 ^0 G1 v% @3 B, q, D#ifndef QTCONCURRENT_RUNBASE_H
7 ~4 e' W- g$ l+ H$ E. w: X#define QTCONCURRENT_RUNBASE_H% e6 M- t4 `* T

" e" ~# |9 ^# H+ C. q$ s* B#include <QtCore/qglobal.h>! ]: g$ ^9 d! y

: x# m- ~, n& I* t% i#ifndef QT_NO_CONCURRENT% k* J" v. u# }, a6 ?& ^
3 B3 O3 W. d: |$ o( D
#include <QtCore/qfuture.h>, F+ ~; b; c( X/ D
#include <QtCore/qrunnable.h>, G8 d! n. p* \
#include <QtCore/qthreadpool.h>- ~0 C0 \8 ~4 j9 x, w( N: D) \
( A( a- }8 i: x5 f7 k& }, f7 e
QT_BEGIN_HEADER
& O' C- Q3 ~. v  `( UQT_BEGIN_NAMESPACE3 m% K3 U1 w7 v4 x* X

/ P1 f7 ^; C' t1 {QT_MODULE(Core)4 `8 w/ @8 n# Z$ x# W
* t& g2 A9 C: r( @5 [5 ~
#ifndef qdoc
0 B* k* }! C9 o  ~
2 m$ x+ _) e9 D4 L9 wnamespace QtConcurrent {4 ]$ b/ [! B! C2 p$ s, ^

* z5 [+ V  ?  s7 M& M  Qtemplate <typename T>. I" O- Q$ e4 e
struct SelectSpecialization% c3 x+ V0 N3 ?' `2 ~+ @: L
{0 d( U! n1 L3 |  j* Y! g! o1 c
    template <class Normal, class Void>  C7 Z' d' @6 @; c& [$ ^
    struct Type { typedef Normal type; };# D* |' }0 b3 E2 @5 G. d* S
};
9 [7 H, Z1 ^) K! ~9 K4 C% o: X, N$ P  d4 C! ?. J% M
template <>2 l8 u, K( w; n4 o
struct SelectSpecialization<void>$ {# N0 r+ J0 H! B9 x, g. e5 A
{) P5 O6 ~) q6 [. N
    template <class Normal, class Void>
% m9 c' ]& y! u9 s) q7 k; V    struct Type { typedef Void type; };
. u1 b! Y" Z/ t2 f) G' w1 \0 j# Z};. ^. ]' [1 i- p
* F3 |0 q! L& o
template <typename T>
  N# r/ `# t* {# T6 qclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable2 d1 @  u. R/ @& f2 o# X1 P5 u1 |
{
0 I; h- p9 h' ?9 ?4 n7 Lpublic:" x& V% F7 k' |8 R$ u% V  W
    QFuture<T> start()- V* Z/ x0 U8 f( ~
    {
' e% b( t+ p# h' C1 {        this->setRunnable(this);4 t9 q0 \  M) [. Y% [& Z. Q. v
        this->reportStarted();- {/ h+ u! u% |- Y. I% i
        QFuture<T> future = this->future();
  h8 i4 M8 P! q* ~& }5 e' H        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
. Q' s: S* i3 X/ z8 h* X6 z        return future;
; ?1 v. Q1 M/ T2 p    }
7 F9 Y4 M* z4 C
# L4 L: C+ g. v% O6 g9 j    void run() {}! a# S+ V; j: ^: z! f7 }/ U; D2 \
    virtual void runFunctor() = 0;9 n; u: t2 d7 C4 u
};
/ [; X) _' h8 j  T; x6 X4 E5 o' i9 ^* ?4 P7 U+ i0 ]0 j
template <typename T># @/ D+ @% n/ q
class RunFunctionTask : public RunFunctionTaskBase<T>
/ S. q. z6 ]/ M. o; {  O{0 }# n; T. K* p5 W* L0 h
public:8 u8 ]+ x2 o) P6 U
    void run()
7 _+ Z$ `' s/ c% _: |    {
1 X: R/ n1 v. c8 h        if (this->isCanceled()) {( p9 [  z3 Y5 m5 a
            this->reportFinished();
: m2 e' h9 D5 X7 r" p; H; I8 i            return;( V4 H% e* ?6 r2 j% M: Y
        }
) p" l4 Q! q* s! H; _+ o        this->runFunctor();
% L: C; \9 _/ Y# @& _        this->reportResult(result);- R. {0 w# S" g% ]) F: S' K
        this->reportFinished();- ?: x) Z7 [3 @- q1 H
    }3 V2 Y0 N' B: Q8 J- Q( N3 l
    T result;
% V/ s4 l2 g$ s};6 H  t7 B. P$ q9 C/ j1 \
& b- F# x3 Z# F) p( J
template <>" s" S1 c7 T' ]& K5 s1 r6 e9 L( d
class RunFunctionTask<void> : public RunFunctionTaskBase<void>* z+ ?) d% [" O+ d& t. N) l: |) Y3 u
{
- z1 M6 D+ m7 V# d% K& {public:: M- u, _! |* H$ O& g& r9 a
    void run()& U# D- z: p7 ], p
    {
& Z" ?5 ~2 L5 f+ [* Q4 R        if (this->isCanceled()) {% V6 `/ o$ X' G! o1 P
            this->reportFinished();
) G% d4 f% i0 B* R" M            return;9 F, h. v. J# Y, z  Q8 W& A
        }5 Q) l2 t. }# b. Q2 A
        this->runFunctor();* N$ q) V! D; {7 O
        this->reportFinished();
2 K( x' ~1 ^+ Q* m' s" H* @    }9 s8 d8 R$ g" l4 b# `
};- h4 B! f5 B+ {" V

) G3 J2 E2 F  C& y  J1 v$ K# N} //namespace QtConcurrent( i& J' [" ?6 @! @4 b8 I
, s8 A$ q0 I1 d5 K. N  E
#endif //qdoc/ g' I/ W3 e7 H4 {' d  T+ H
4 t" I( O& x8 C; w% b- f, N! f
QT_END_NAMESPACE
. ]6 b6 |3 E( \/ M' oQT_END_HEADER
7 S, v5 ^% ]& I) `) E; V, F8 J
2 L8 z; M: I& \# z6 Q8 f6 t#endif // QT_NO_CONCURRENT
6 F; A$ o; [! G) M# b& }6 }6 ~
7 T; n! A+ z: O1 X#endif
' s( W/ c$ K& I# {- b7 ?" \) x7 ?2 X) q

作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?& h( ?0 t9 ^% U, a+ b3 Q' ?





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