嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
1 M! _0 A5 F. f  M! x5 e/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
+ G: L" r5 w- {- R9 A, G' f, Y: ^) ~1 V, j4 Z& a+ l: m
这个头文件内容如下:
0 G( N+ D! e  ]6 u% m' E#ifndef QTCONCURRENT_RUNBASE_H
& {2 ?! p$ c/ c+ Q$ S; R- f#define QTCONCURRENT_RUNBASE_H% m1 K& w/ G2 S5 @3 y2 k. J4 y9 C

  Y( y9 _& w2 S  K#include <QtCore/qglobal.h>- I5 M  d# H" X

) v5 {2 i, A7 c1 S#ifndef QT_NO_CONCURRENT0 A( F& P/ \5 M% m8 W: e& z) ]

/ B) S  I- ^. O5 {* d#include <QtCore/qfuture.h>
6 N' p- D8 T  y0 k: w3 [- x#include <QtCore/qrunnable.h>
! e$ T; g& `5 ]#include <QtCore/qthreadpool.h>* C: b& Q# K* K# g. |4 u' x

0 D1 m! }" F+ y/ k! I# H& m: M! uQT_BEGIN_HEADER+ \( [2 }/ f  X9 C  d
QT_BEGIN_NAMESPACE" Y8 {0 b5 M1 n; T- L5 E$ v6 L8 p

2 R% C& J+ ]( L, x" e1 O# gQT_MODULE(Core)( m5 J0 D4 s( y/ x& O8 W; _% W6 P

! q0 n$ [5 b. Z9 G( N3 G& n0 i#ifndef qdoc
2 w! ?5 O2 d7 c% q. n. v
+ X  L' m$ C, ?4 s5 T! p0 w! }/ hnamespace QtConcurrent {8 q( }& |8 j( Z) V% x' f% ~
( w% ]; \7 G( o9 u6 p. F
template <typename T>
/ b5 p- Q7 P' o! y5 ^struct SelectSpecialization7 l0 Z& n( O$ c  X
{- B* F0 f6 [& S  x6 V( m8 z+ R3 ?0 Y
    template <class Normal, class Void>0 |$ O' p; w$ O0 A, c2 H8 ?
    struct Type { typedef Normal type; };9 D. b- f- f/ E; }& F) z
};
  }- F% [2 I, F8 e! ~3 c: d- P" @" l( J  R, I8 y$ e( l
template <>
# n5 Q6 O, f6 Rstruct SelectSpecialization<void>0 _5 t& P( M  V7 l
{
) q3 |) b8 y7 X% u& E    template <class Normal, class Void>- h) |! D3 O* Q& s: O
    struct Type { typedef Void type; };& n2 X% E% k: _$ J. ?* e) ?: ]4 l
};; z- Z- A) e6 p/ @

& g9 G1 T8 V, D3 q) }0 A, R% K( rtemplate <typename T>5 A6 G$ r: q1 ^' @" Q
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
) \) C, o8 U7 o: a- a* C{
* }( z3 R) V1 K% W+ \9 _+ o* D9 d/ Qpublic:
; C: x; I9 F/ l- @% V+ ?    QFuture<T> start()+ z" }- |3 s  l7 w: Y! ^. `4 n/ f
    {
# k. X: Z% t" k. }1 f" n( o1 Q        this->setRunnable(this);
, N6 I2 O. U  E6 a* j) k9 s3 d7 C        this->reportStarted();
- U! p$ T+ }  Z' D        QFuture<T> future = this->future();0 L' A/ Q+ y4 l) Y, i
        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
4 ~/ r% Z; j) ^5 }5 R1 M: l        return future;+ a+ e4 m; ]% Y" d& _% N
    }
+ r4 \% O: a* ~6 H* m2 W' _7 |+ z  n. X/ g- G9 A
    void run() {}5 g: I* q! {$ e9 [
    virtual void runFunctor() = 0;
; e; a( ]7 y( y* i# _. n$ _3 L; ?};
2 I5 r- l- m# j$ I1 w5 ]  R  K8 T" @& W  g! \! g4 ^( |+ D8 d
template <typename T>  s: Z; E& b. K7 ?0 Z, z3 W
class RunFunctionTask : public RunFunctionTaskBase<T>
" J# x0 l7 s) N4 i{
0 w0 _6 ~; F' u2 ~& xpublic:
, E% K: p  i' u    void run()
- [, g; E/ c/ D! f3 V    {/ _  f0 ]  `' k, N# O+ U
        if (this->isCanceled()) {
$ N9 u3 T) R! y, g            this->reportFinished();- r" i7 v' Y. r2 e7 o2 o
            return;
. }. V# K( C$ @6 M7 e        }
* ^) D) X( L9 s4 j# E        this->runFunctor();/ z% m6 E+ n: o! d
        this->reportResult(result);
2 {8 D" r: z" R; o; a8 a        this->reportFinished();
7 {4 ^; e% ]7 ?) q* b0 _( c! d3 w3 {    }
8 ]: k' m( `* j1 m: i# G    T result;
+ `) x1 x5 C- Q1 i( s* f};
6 E6 w% W+ R* F5 z# l( ], M* y# ?" {
template <>7 n5 B, F# |  h! r
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
# u$ c/ r; _5 C% W{& W7 }; s- E" m$ M
public:6 l  G* o' V# s  b$ M
    void run()) l2 ~4 y9 F8 d+ y1 N3 @/ j# w' m
    {7 G% A* J1 A' x& W
        if (this->isCanceled()) {/ M; r) e' k/ C5 F4 m
            this->reportFinished();/ o# j+ n1 W) k4 `% `2 B
            return;
+ g# b3 ^, C+ z$ ~- d1 y8 p        }
. m% H! r. l+ Y& `        this->runFunctor();5 _4 `" O$ |6 q6 |0 I# J
        this->reportFinished();8 v; ?" T, ]; x0 H# `. A/ |; Y
    }
7 G1 C+ T( e+ v};
" k1 z+ G* o- Y
' B3 w. p8 z5 u% [" C} //namespace QtConcurrent
- E1 `% u; n9 ^! F; P' m: q
, N( T  o2 L; Q  G" F, b' L#endif //qdoc: L. D) V9 {4 _* y0 m/ d$ S6 w
  }, U. b2 \8 g7 n  A
QT_END_NAMESPACE
2 M& L: ?! L9 {# r! k( f  a/ qQT_END_HEADER9 a8 w% O0 F- a! U

6 a4 k) p1 \) b( W- P#endif // QT_NO_CONCURRENT
* Z8 v" Z1 Z% C0 }& _1 O$ @+ R! G8 e( b1 l
#endif
* `5 g! W, c0 a6 O) q; P- [. \1 s& r

作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?' ]7 s& ^' \; P  w! S# s





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