嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
. t- P5 F! w% {- ~3 b% ~/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
4 {) {* c! b/ m- Z! Z, X
- O1 `5 W( i- `. [9 f; ^: I这个头文件内容如下:
+ E% K" Z( @6 I# Z0 `2 _, e#ifndef QTCONCURRENT_RUNBASE_H0 u; s" Q! D6 [4 ~6 }, A
#define QTCONCURRENT_RUNBASE_H
- n* `; u) Q3 }3 y- Y( u, j% ]4 L: W% F) J2 P' p
#include <QtCore/qglobal.h>
+ Y3 c" H. }9 b7 a; c. a8 Y1 B0 e/ D3 F! W, v
#ifndef QT_NO_CONCURRENT
5 \! l" a& C% Q  f/ ~& e3 e+ h! ~
4 m: u  m( q5 H% ]#include <QtCore/qfuture.h>
/ Y& n3 B' k! s$ }  k* X4 ]8 G, U#include <QtCore/qrunnable.h>
3 r7 p, j6 ]5 L4 {9 |. o#include <QtCore/qthreadpool.h>
' K8 ~% W( B/ M5 M' S3 h( f" S2 _- \$ _3 ?7 b1 R1 N7 t, q
QT_BEGIN_HEADER
' Y- Y. v$ Z* L9 h( CQT_BEGIN_NAMESPACE
- E% `. x3 D# d" [& z: F
0 J5 @& Z* @% v8 V. S5 ?5 eQT_MODULE(Core)
4 L% R/ J8 r1 p. @
9 ~7 L& P: J4 _$ g& f3 |#ifndef qdoc0 r& m* G1 g5 k! e! V/ w( y! y1 j
: x: C' t* }8 k5 O4 Y, m
namespace QtConcurrent {3 E  y; ~, v, B
, a% b. S( ?1 R. ~$ j/ K5 O( e# F
template <typename T>
6 r2 B% w0 L! ~" y& pstruct SelectSpecialization
3 [4 y: u' p+ y. S. @" ^9 C3 S{
8 q) O- F4 M0 o% H    template <class Normal, class Void>% Z+ x* l/ y1 A+ [! l$ h% Y% |
    struct Type { typedef Normal type; };0 Z! Q8 D- L, q9 _
};
9 @) x6 C0 |* T1 l: _& A* K# T6 ]4 e6 F
template <>
' I, u# X. R2 @1 V1 d/ Z- Fstruct SelectSpecialization<void>& N- I7 u7 O. V4 Y, q. g" H2 w
{% C; q' ]0 b5 ]) C0 \$ U/ Z7 Q( M
    template <class Normal, class Void>7 a3 R3 ?9 O& ?% N8 n+ \* x9 d
    struct Type { typedef Void type; };
7 N$ r2 R! C0 e  i* |& M' l! V};+ Y- r- |( h+ ?$ r8 ?) J9 ^

* y, X+ j' Z# e' ~% j: R1 Z. ]template <typename T># _# [5 O) J- M- z
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable1 ^' H1 ~. r2 E0 D/ A& B8 b
{$ D" y# y5 t) y. a! d# }! @
public:1 S% E( E( R* S% {' @
    QFuture<T> start()/ Y" o( R& O4 `% @, \1 x
    {
( V) e. I0 L2 I  \  a7 ]! k+ K4 L        this->setRunnable(this);
6 n$ P" y) R' Q( c7 l  m        this->reportStarted();
- a9 f9 k) o5 z/ W9 E9 I9 V2 O0 l        QFuture<T> future = this->future();; s* k- K* I) i. r$ W
        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);! P" i% Z# ~! G- J# ^9 P) I. b! Y
        return future;: i! q$ V2 f; q" B6 V# v
    }% ?, y/ V5 G. }) B- t8 f! [

1 B7 R7 z8 X  x    void run() {}
4 n" m; z: _. t: S" b# o) Q1 F    virtual void runFunctor() = 0;) A  a& q6 f) M
};: c" Q# r2 K- ^3 E

9 B' O- @) y0 l( u6 o! O, Stemplate <typename T>1 ^: Z) d2 w" D
class RunFunctionTask : public RunFunctionTaskBase<T>
0 P% e2 @3 x  w7 p8 B{
) M' K: z$ @1 Z: apublic:
9 F- @) a- d: c! w2 ^% K! M" c    void run()( ?% @: J2 F" P( k- }
    {& k) N* {; h. U" s
        if (this->isCanceled()) {
! Q+ F/ y% _' `+ E! n            this->reportFinished();8 l2 w7 G$ ~- z- I) o! `
            return;) r" X$ o: V. |2 q, m
        }+ l6 u9 R7 [2 d0 v$ {3 b5 c
        this->runFunctor();
) J5 ~! F  C8 v0 H. A# M  y; X        this->reportResult(result);# Z4 H9 E0 i/ A2 Z9 V* m
        this->reportFinished();1 r' }$ a, D" v8 a
    }
2 Q. q7 x& w. [8 n+ \8 r" H    T result;
) `+ l; w4 t6 |! ~6 r! |5 B};
( ]# |( l0 y) D, F$ a) ^" g, ~. `* Y
template <>
7 D) |% v) ]6 _class RunFunctionTask<void> : public RunFunctionTaskBase<void>
$ N: o. ], D: X) K0 ~{
+ M1 k# m' g+ C- e/ tpublic:
5 h# p4 u' U/ J$ H; g6 ]' i    void run()
7 d, l* e/ P3 K    {$ ^6 r$ {7 e5 \( d, N" G% J" R% p# _
        if (this->isCanceled()) {
  _+ r/ a8 [" r; ?1 ]2 O            this->reportFinished();
3 n& `7 U; X8 s! T5 \; I4 J9 R            return;
2 ~! u& X+ i& {        }( K$ X  o, w: ^6 Z8 o" Z  }
        this->runFunctor();# z2 o* d4 T1 b- Q5 V3 E2 E$ X* m
        this->reportFinished();
$ e( _; @; }& c3 Z; Q    }
+ B8 V0 s% H/ G& k* G};- [2 P8 P% \0 Y4 d' }9 `5 b2 W
& ^0 M! Y5 w6 ]  T. U
} //namespace QtConcurrent, E/ j! C/ E% a; Q+ n% I

) z9 o8 U8 k, t* D3 q#endif //qdoc
* D) G- A9 q) B/ D
& e! F/ Q7 L' d- p  o9 Y0 U+ k) PQT_END_NAMESPACE
5 J" o+ q; d5 P4 W2 D+ iQT_END_HEADER
2 K5 K7 H: ~* r- Y1 W1 J% J
- M( Q2 |& U1 f% l#endif // QT_NO_CONCURRENT- l" [/ x8 k; K4 R8 |9 t( l

* y6 }+ R+ r9 w7 `. p7 y#endif
1 v: j. ~4 V; u% M" @% Y( J' f/ a& V
( J" k6 }3 S" `
作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?1 j: O  h6 j$ s( Z' u# F$ p. T  i





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