嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
2 m' J$ t. O5 }/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 ]" p) {$ g# U, j1 p/ j& R# O) W

# j6 d1 j" z! f, J3 q* v, |* e这个头文件内容如下:/ o% X) Y! v* [
#ifndef QTCONCURRENT_RUNBASE_H3 K/ @+ r$ q. z8 X1 j0 b
#define QTCONCURRENT_RUNBASE_H
+ t6 E: N2 v+ {7 |9 R6 R7 a  _" L7 S* s+ o% [$ Y
#include <QtCore/qglobal.h>$ O5 t5 L8 T) P/ K% W5 E

, e9 Q% F" n4 k$ y  ]#ifndef QT_NO_CONCURRENT  r# E; H! B& v" s$ W9 {

# [" P0 G$ r2 B" m* o7 V8 p#include <QtCore/qfuture.h>6 |5 \2 ?, e2 x& D
#include <QtCore/qrunnable.h>  E! `$ Y1 Q* d0 k9 d) [# Z$ @) p5 ]
#include <QtCore/qthreadpool.h>: `. x2 k& ~; o& p0 ^# y

9 y/ g6 ~* t. k' p/ Q( `QT_BEGIN_HEADER
. I+ n" f4 a& A0 xQT_BEGIN_NAMESPACE
4 k) ]: X; D& d! M0 o9 Q% |# e" I( s
QT_MODULE(Core)/ b: s- ]" K' H3 l$ ?. ?1 c1 G; q

' W2 d  V, }/ U% O, T, H: X9 R#ifndef qdoc) v' g: i: Q3 C7 I1 \: X1 y8 ]1 d/ B* d

( M2 p9 \$ q7 u. ^2 b* C$ l+ o2 x  B" Nnamespace QtConcurrent {: h. j9 T& q% m- j, y7 `0 O9 a) u

. {. F. _; Q9 a* k+ [/ Ytemplate <typename T>. Q+ u5 f, j. ]) a
struct SelectSpecialization" ~7 V1 A. W  U: ?) s0 V
{
/ a4 o) E- u! A- t    template <class Normal, class Void>
& o( X6 r# F. `- N3 e    struct Type { typedef Normal type; };/ g3 _9 _9 t9 n" I$ ^
};
! |  e: v$ w1 Q6 a3 `0 d( G+ E* @" u( Q) ]2 X# I' n3 }8 e
template <>. m" u: S( R( s- F+ ?" U
struct SelectSpecialization<void>: I' W, b" X' }, U
{
. Y6 Y( ?* K4 {( A8 C3 [    template <class Normal, class Void>  I3 A3 n: S$ ^2 p
    struct Type { typedef Void type; };
3 E" a4 ~% e% a$ ^& H5 R5 j& s+ p};; l1 e/ ~2 P) _) L2 m& C: r

9 I  L% @7 _' @9 y" C& Rtemplate <typename T>
# f3 b* G( o* q( f7 Q; t4 Oclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
; N+ B: ^" u8 e+ g& p. v% g4 v  h{
: x* D& ~/ a) E0 wpublic:1 z) \" }5 |7 N# t' |
    QFuture<T> start()
$ E5 B! h) ~6 v# G+ J+ ~" M: y8 F    {# U: ]) n- B; }/ b+ W
        this->setRunnable(this);
, n, o7 o( m, w( K  R: x' U        this->reportStarted();
# f# w& d( Z; J3 D0 r" H3 V        QFuture<T> future = this->future();
& f5 H# _5 \8 \: z        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);" N- w" b. o- [; A6 _
        return future;
% e2 Y  {) f6 f; c# w4 _, m. F- V    }
$ L0 b/ m! B' A$ \6 ?% r
% ?/ F, ^0 P6 b( Z# Z# H% P    void run() {}3 ^$ Q/ @: f# Z" b0 Q5 z; ]
    virtual void runFunctor() = 0;/ t! G/ W: G4 Y! H  m7 A5 ^; K; `
};
2 M. b# y; t" N& _' S* s, o: J
5 R( [5 M3 @. `" x8 t. W2 xtemplate <typename T>
6 ?$ @1 Z) V3 fclass RunFunctionTask : public RunFunctionTaskBase<T>
9 k! T) w# \1 \" S8 J% f/ y& s8 q{
% V" ]5 t1 n. C  I2 A: \! J) u( {/ J! Opublic:! E# L: x, ^1 g& \3 ^* j, {
    void run()
& t$ x9 H+ N" A: o, E/ L5 z! r9 D    {
: Y+ n! c) S6 L9 N% o6 ^1 Q% c        if (this->isCanceled()) {& Y2 L$ C( }% w4 M' [* I9 T
            this->reportFinished();
* Z$ ?* ?* G; J0 W# `8 {- k" e  G            return;
: D6 R  {. N5 B        }
/ C* G+ i+ k- _4 g        this->runFunctor();
: G, H# K1 k: {; G0 {        this->reportResult(result);
# c# A+ c& ~2 v9 _9 m8 M        this->reportFinished();
# v% @% K4 Z7 T) G9 v; h) e    }
! d# }. \# w' N    T result;
) r% V+ y+ h. t/ c- K  s! [# S) P% c};
, U1 B) d( y4 A3 a; b1 L' N. ^. J& r$ t2 F1 Q
template <>
9 H: L4 C* o: H9 x9 I5 Iclass RunFunctionTask<void> : public RunFunctionTaskBase<void>
& J1 o! W. n2 Z. i, S5 m6 Q6 P$ y{
4 V; ^1 ^8 O3 ~public:6 e( m- H4 L3 w6 W! V# a  w7 T: ~
    void run()
6 H/ B) {/ V0 i5 r" E" r( z& A    {
' _0 s0 J: ]6 P7 V" `1 j        if (this->isCanceled()) {
/ n$ n8 q  U, W9 n7 l- @: U* v            this->reportFinished();
2 S( |! Y. o5 m2 U3 ]) W2 O            return;$ l8 U) u5 W. p' y  U
        }4 b3 W  @: ^0 `+ o; P# i
        this->runFunctor();
# a! W: D& {+ ]2 s- {        this->reportFinished();
% E+ {1 l) N3 ]& h    }+ G- M- d" j5 E) l
};" |+ s7 }+ ?  V$ D/ E9 {5 ^

* C3 F* f" D1 V% s} //namespace QtConcurrent
. G5 `# ~9 l( z. j* \% ^! O1 ~% D9 f* L9 }" W4 o
#endif //qdoc
$ K  e5 a$ `3 U5 `" ]0 F5 {
* l) V) _* ^9 r' g. x9 [% ]QT_END_NAMESPACE
* g" n, g0 @/ I; kQT_END_HEADER
! h- ~$ m) l% a; y8 [+ L: `9 H( y- N$ }
#endif // QT_NO_CONCURRENT, |+ i7 c& e9 `& \2 C; u' M! t
# ~; R; |+ I# s, n5 t  S& j
#endif
$ p# Z8 a+ X6 e/ z
* O7 H, K- G1 D3 Z. w+ f) u6 [
作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
. u) b$ L) i% N6 K( }( {6 f  b




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