嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:; I4 m1 m* d0 C9 ?6 u+ h. j
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'$ O* ?6 V* n4 E; j/ v( v
1 l4 [7 N8 ~1 u- |# g, x- k0 u
这个头文件内容如下:& O7 i9 m8 |' K  H& E1 V/ d( c, }( R
#ifndef QTCONCURRENT_RUNBASE_H) R% U0 D5 m" U* ]! E& J2 H/ b$ \3 s
#define QTCONCURRENT_RUNBASE_H/ d) l# U- \" x* F0 A) O
4 S" t! \5 M1 [3 S
#include <QtCore/qglobal.h>6 M6 }8 Y& y. ?6 X- F9 q# p% {: j

# z' v# A" {( ^#ifndef QT_NO_CONCURRENT
9 U% E' D1 [: H6 d1 R5 G4 z2 K7 O5 T& A* L" a1 ?' S; b
#include <QtCore/qfuture.h>/ n' i1 Z2 y3 y% z. C. {
#include <QtCore/qrunnable.h>
9 U8 r+ e. P( s5 T#include <QtCore/qthreadpool.h>6 }2 }3 f  A7 s
  Y0 G& X- g. E* k& A9 \
QT_BEGIN_HEADER2 \/ A* q$ h& H; w
QT_BEGIN_NAMESPACE
; Z2 A: P1 a. L) j* z) ?) T, f& H7 _4 N. _
QT_MODULE(Core)
; {1 J: r; ]/ l, _' p7 S; J* K( ?# t
#ifndef qdoc- r/ |1 V. _0 W. x
' P+ _" J" h, @* l$ |0 V
namespace QtConcurrent {; D! i/ @3 r& Q3 W

8 n5 H1 o; q3 c, Vtemplate <typename T>
0 M5 ~* ^) u7 w: V$ ~; a* `/ |struct SelectSpecialization
0 ?1 M- w) q) O- f% q( m{+ r$ B! L. X5 v% W7 G5 f$ i
    template <class Normal, class Void>
/ V4 i, Z" }, i5 Z: a    struct Type { typedef Normal type; };
% d, x9 s8 _* e/ Y6 s# R9 k};
2 l. Y  `  P8 I! N" y6 @+ W
: m( j/ L8 A9 Utemplate <>( X& r- _( p3 O, X( p9 V4 A, `
struct SelectSpecialization<void>
" I/ S! C' [: p3 }2 R- }# I{
; e* q& n& K8 n    template <class Normal, class Void>
, H2 E2 y* e. ]! ]6 E    struct Type { typedef Void type; };
) Y' Q: l6 m8 N7 k  z  q, a* t};
* F4 u( w( l; d6 o" F/ b/ R2 ?* [) Y7 ?4 s
template <typename T>& B$ s. A) a% V7 ^3 t
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
/ E' G0 y4 N, F& ]! N{/ q+ z+ E+ `3 e
public:
) T1 C: E+ }6 C( M) F/ m    QFuture<T> start()# l7 i9 _/ {* X: j" S' V
    {( ?5 |8 R5 g$ i0 d8 ^7 Z+ V( E
        this->setRunnable(this);' K1 R# ]% b( h$ X/ p
        this->reportStarted();
" D1 d) M' N' g% F7 Y! j# U        QFuture<T> future = this->future();
; @0 }# ]2 T9 V6 M+ o        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
! C' o( j/ H* X  c/ C        return future;
; e. e" d) d& n) L    }6 R6 ]& ~4 X+ W  G
5 P: g8 P- v; f8 Z
    void run() {}
2 T. `7 C% i; H2 A" x) _- ?, [    virtual void runFunctor() = 0;
% y  `0 u% {+ b; I/ Y2 h" J. X};
, b' {; `5 o8 q7 v! F4 K: e% q9 e: J" _) c- o4 S
template <typename T>  W& u% {3 ^: z" i8 r+ R2 i
class RunFunctionTask : public RunFunctionTaskBase<T>
( ]6 P$ g+ `, y3 C" |, w. a{7 r' {8 E$ i2 N  u9 d! q
public:
& Z1 U2 H$ U; d& J# J* y1 I    void run()
* r7 F% x3 |, E, }# j" d% u    {" j3 ^5 |) t; C$ k& S1 {0 d( F9 d- c0 a
        if (this->isCanceled()) {
( O# `' g, Y7 D7 ]. u; {* T3 F            this->reportFinished();1 x" Y, q7 y. S9 n6 e; G
            return;' W5 X! r  y. J+ j! E, i( J
        }8 @- [$ S0 C0 o0 x1 p  e
        this->runFunctor();+ O* M4 T1 t) n# @: n
        this->reportResult(result);; I+ X8 e5 w# X" y0 [( F
        this->reportFinished();
7 j! Q9 E1 b. y( b    }4 m& R2 y* w: E# z/ Q+ Z
    T result;) p4 a" ~) p+ }
};& z# q; S# q' Q

( q: U3 B/ c$ P/ s* A6 K6 _template <>
. X9 t* M4 j6 O. }" l( Zclass RunFunctionTask<void> : public RunFunctionTaskBase<void>0 F. G$ k5 g6 \) y; R
{! ^% ^6 D4 |( _3 [$ e, Q
public:
6 }- M, X' O8 R6 l# i: C    void run(); o% B. j9 ~" U
    {
3 B; o" c2 S0 V8 B# [: o        if (this->isCanceled()) {
; F2 G- x. i; ?            this->reportFinished();
, Z& `. Z( f( G  O            return;2 l# C* O2 B0 T8 @! j5 m+ r! k3 v' l. e
        }
* o* b% \% U. X5 _. u( K        this->runFunctor();/ x% B* Z( m" q+ Q7 [/ j
        this->reportFinished();, @$ L) |" a: C4 u
    }
5 u( ~" y" x2 E: d};3 D% g1 ~. x6 P7 G, s5 k+ F

7 ?. ~, S- A. G} //namespace QtConcurrent! W- w6 o; G' }8 }; R- F0 D4 ~
6 Y. F: M8 p* B5 t& X7 A+ W' k
#endif //qdoc
; h/ u3 Z. }, s: {% l3 H# T' O2 k
QT_END_NAMESPACE
* h0 R' J6 A) \- a; }7 U2 s! g* EQT_END_HEADER
- M* ~$ q3 g8 x  K
$ v1 b- l" b) Q5 }) }- y, F$ E#endif // QT_NO_CONCURRENT1 z5 T) ?+ \: N0 D5 Y3 m

, @" W7 h$ e+ J! f* D' l. {2 n#endif
  P& k9 A/ G" t9 t8 K& @# N  n3 K0 _) Y
6 O! T6 c% j; p
作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?$ o3 ?( |2 d6 h) u% x7 x$ x1 G$ w





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