嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:' ~+ h- n/ S7 c7 q) 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'4 m/ a) y. l& R' r

6 p, z$ z' w/ S9 d* G2 z! S& X这个头文件内容如下:! M7 k2 {' O* f8 V3 W
#ifndef QTCONCURRENT_RUNBASE_H
4 T5 {: T1 D) _7 H* Q( u' M' {) E6 }#define QTCONCURRENT_RUNBASE_H
5 @( n5 P1 B7 T, t1 `5 l* c$ G2 n* [4 q/ l- t* i" ]
#include <QtCore/qglobal.h>! O. m) e3 A+ E5 [8 X, U

! {1 j: O! ?' ^3 L#ifndef QT_NO_CONCURRENT6 Z4 }- d5 h1 r
4 W$ Q+ Z! C- m
#include <QtCore/qfuture.h>
% P: b  _2 J4 G+ b#include <QtCore/qrunnable.h>- @. h' }7 I! x3 ?* T/ V
#include <QtCore/qthreadpool.h>
: D2 B! K) ^8 C" Q& e
( ?% |$ P+ c4 d2 b% RQT_BEGIN_HEADER, a- M4 n+ l( m
QT_BEGIN_NAMESPACE. P) q' ?4 X/ i4 g) L7 N5 I) ?; g

. R. U6 Q, S6 e4 AQT_MODULE(Core)  I" n( G; _7 c) I

! K# |; `! M6 C0 U% C#ifndef qdoc' B) h) j! T/ p6 C+ ?
" n; d$ h* ~5 [, b* |7 }
namespace QtConcurrent {
6 m# A5 _+ z* e$ ~5 j* v1 M3 t8 [, `; p" }
template <typename T>
" w" s7 m, f: N0 U+ K4 y% astruct SelectSpecialization
( z1 x$ D8 F& O0 f/ A{5 ], n+ N  A5 s# T
    template <class Normal, class Void>: y! C& l5 \  U6 L; R" W+ P( A9 k
    struct Type { typedef Normal type; };
* d5 t* C" `" @& x0 o};
0 F) e) R- x" H( d+ J5 r( F/ X9 Z/ R5 @0 o2 n, y$ W% Y. h
template <>1 K9 j4 S: @' k
struct SelectSpecialization<void>7 P5 i3 V5 P. U* r' d8 g/ b. b0 g
{0 V2 K- V& f6 ?. [0 @
    template <class Normal, class Void>
5 N% }4 v, s& Y( Q, O    struct Type { typedef Void type; };+ _: H- F) Z; a
};0 O/ P  q6 D4 Q$ O& a! U

! Y9 w. D' f& P$ t5 x1 a) utemplate <typename T>
- S$ m% U) L8 i$ Y' xclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
( L' ?0 Q- j/ g8 h% C5 C! l& v{
# [# t# t3 J' L$ H' K9 Bpublic:
: l2 v( `+ w3 U2 H, t7 y    QFuture<T> start()
; B3 C8 J' J+ A& ?: p    {
$ G% ^+ ^/ G, ^) r  p        this->setRunnable(this);' j0 C) G9 Q  D4 A
        this->reportStarted();
' U9 Q1 x8 i9 U1 o* |( |        QFuture<T> future = this->future();$ }2 L6 X2 M; w/ X
        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);: T) T  i  s# ^9 b, P
        return future;) W% [% I/ l5 [
    }
% \  e, ~; U; C9 w; K$ @8 v* e
3 A" J% _+ s7 R0 Z+ N    void run() {}4 A3 t. C" A. O+ B+ H
    virtual void runFunctor() = 0;
5 j9 o- ^) Z$ V: a9 g  M: r/ O4 R9 ~};* v, [  u4 ?& s5 b
% v1 o$ c) R3 a
template <typename T>- J: T: @4 @4 G) D( {
class RunFunctionTask : public RunFunctionTaskBase<T>1 v6 G9 B( g) \
{/ u* J- f8 Z' g7 g  v
public:- L  @$ C' Q# J: {/ W: A) {9 s
    void run()) {, Y8 Q1 n! m1 f% ^& z3 x& `* z, |
    {0 n( |# P; y. t% ^& }; r
        if (this->isCanceled()) {3 R6 h/ T; ?; R
            this->reportFinished();
) c% [7 H9 O7 d. |5 h8 Y$ l& L            return;& A9 l: b% J3 L! @. M' h0 r' V
        }
$ ^5 w  y9 g( X, |2 v4 m; L  J. Q6 ]0 S        this->runFunctor();
4 r5 r# F+ q1 ?5 Y8 O        this->reportResult(result);
3 |1 K( ]" F7 e- Y8 f) k8 _        this->reportFinished();" l$ u/ F5 X5 v8 V
    }
$ z' k) `+ r: x8 F    T result;
: K. i7 f4 W% I' u+ N- h7 k};. E% ?& j. u! }  s9 t

) U6 u: a  k0 _0 y" W: btemplate <>/ S6 w  ]7 E9 u, _+ R9 P4 E" c
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
. |" T) e- E  y1 N: H/ z$ y{/ s! o4 Q5 i5 M$ {; [
public:8 r- x: O& U2 S
    void run()
; a7 N  _3 e+ w2 ?; ?# i    {5 P( r7 M4 I+ P; W
        if (this->isCanceled()) {
8 c8 V) h% a7 q5 ]: d* K: u            this->reportFinished();
' }/ H0 g) ?  Q% o            return;
1 d* ~4 K/ b# r4 Q  Y6 r0 M        }
* T5 {- _9 o$ R+ g        this->runFunctor();
; k" ]0 S9 Y7 l! Z. [  V% c0 o        this->reportFinished();7 C. l$ b# J% d! f
    }
+ m6 o, W& D7 k) |$ j};
' k3 ]  G8 ?  G) J6 d% l# W9 e% e
} //namespace QtConcurrent; ]( O- u9 f% e6 {

4 J6 ?, x, o% j) }, n& f#endif //qdoc" I4 S9 u5 x% w4 w, d) m  \
' G/ K2 M9 c" T4 }2 S6 X
QT_END_NAMESPACE
; V* z- v" D" b0 B8 D/ w! P% E5 y3 RQT_END_HEADER9 ]! C' a1 h  c- J" h

- X; F# I6 T, W" {7 c$ T#endif // QT_NO_CONCURRENT$ E2 T0 J/ d% i$ ]
; Z) z. ~7 @% a* K# T
#endif8 w! j% F% w' s6 C* `8 f
4 p2 }- y$ W  S# v0 k- ?- J( K/ m- [/ d

作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
! Y& \6 g6 [+ M  ]1 _) U




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