嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:( z7 l3 C4 m& _8 d5 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': P& N! s2 V) d- H3 {# K+ G

9 O7 w+ m5 R/ Z- o* l6 Y( x6 Y这个头文件内容如下:8 S5 }4 B; w; I% z4 H
#ifndef QTCONCURRENT_RUNBASE_H' [, h1 x% e% H- X( M
#define QTCONCURRENT_RUNBASE_H& l- l; B7 e: R

! \. z, g1 |8 q1 N#include <QtCore/qglobal.h>
8 F& H. H% f0 h% k; L# u$ k# J( ]" A/ |# n0 j+ T6 K
#ifndef QT_NO_CONCURRENT2 o, Z1 h! i+ Y8 p

( g+ Y9 E3 Z5 L% s0 }3 W6 r; ?#include <QtCore/qfuture.h>
0 o5 |# V! H6 F( n( G8 X#include <QtCore/qrunnable.h>" t6 w. t# h2 h* `; [. V/ _
#include <QtCore/qthreadpool.h>: q" E; b% A. U1 C% E

4 ^& }- w3 j) s) c& GQT_BEGIN_HEADER
! C! @! `1 o  c3 [QT_BEGIN_NAMESPACE- G; @: G: h, Z0 X2 x! T% G

. B$ e: A2 S& Z5 |( R0 B3 \# k6 ZQT_MODULE(Core); i; z; N8 I- d

0 f% F# M" i  V4 v3 N( c! ^0 ]#ifndef qdoc/ x  H3 E5 G7 J7 C4 y1 w9 o- `

4 S: S( O  L% ^namespace QtConcurrent {
5 F: C0 N* G- [7 w( s8 E8 u4 ]! w
5 ]( h+ ]1 d* j) n; y' N4 ]template <typename T>) x: F! I1 c% D4 w( g/ W
struct SelectSpecialization
' w; y' @7 z$ ^& R{( F6 U- z3 F7 b& K5 v, F
    template <class Normal, class Void>6 k: P0 m* r3 l+ ^/ ^! b
    struct Type { typedef Normal type; };2 a% R1 @! y: @0 {) r
};
# V1 h$ ~; g+ `! M( s: Y, `0 B/ \) h4 l& G
template <>+ c. n3 k4 m9 o" M! p$ _3 k
struct SelectSpecialization<void>. ~9 i1 C9 l; n, }7 d+ b
{
% _+ `2 H5 `' f" V0 e( |+ e    template <class Normal, class Void>
& E! n) F. j. E5 u    struct Type { typedef Void type; };
7 K( l3 h8 r& L  L5 Q6 f( Z0 [' S};2 z4 H, X  j; {+ v( N/ K% t
9 G8 W' C4 b1 M4 }7 T# l
template <typename T>" O0 q8 ^$ D, O1 B' c9 [( p, {
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
0 _3 _' z1 q& j: H' |* [& b{
1 g8 d8 M6 }# i& P) N( X" ~4 Spublic:
3 A/ w4 g9 F  a5 v  j    QFuture<T> start()
+ C/ _; v4 D6 X( f7 t9 N4 z    {
/ Z& S: o5 z/ o: T        this->setRunnable(this);; P5 m3 L0 _; T3 ]4 F7 Z( ~5 @
        this->reportStarted();
9 @3 [1 V1 J( W        QFuture<T> future = this->future();
1 e# ^3 Q5 R" }* Z( Q        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);, V0 A2 T0 M! t) V
        return future;
2 D( T6 d5 B2 \8 r2 s- P6 T    }) Q7 l6 C( J' T
+ l- K3 r4 C2 x3 e
    void run() {}8 ]" m7 t( V1 `; G7 v: A* [
    virtual void runFunctor() = 0;$ b7 H: P5 t7 [* u( n! w
};
0 Z" Z( X) B) b- a. T( h3 [2 O
% `4 b2 q1 Y& h* g$ y+ Itemplate <typename T>
0 D$ J/ o$ A! l: g8 Tclass RunFunctionTask : public RunFunctionTaskBase<T>1 ^2 c2 S( W! @5 N
{
, e$ o  M& A: E* |public:0 r3 J0 V* V% |
    void run()3 c; q; J& G% f
    {
. E) [7 B! `: K) \. s        if (this->isCanceled()) {
. U8 d2 x6 P: t3 h1 n4 G; _            this->reportFinished();
8 H" B2 k/ Y. B            return;% c, S; d! z4 i" `
        }
" z: F& M1 c8 P2 s' B- J        this->runFunctor();0 s# f3 i/ `' ]. q' H7 _
        this->reportResult(result);3 z9 x0 X, r5 }! _" j
        this->reportFinished();+ K2 r: C+ K8 m1 g9 L
    }. H+ q9 b, y/ R0 Z
    T result;
% k- `) R" J- E) H, E& i" f9 C4 r3 l0 j) [* N};
# |# l0 F' M$ O: B# R3 r$ B- H8 U+ W1 q" C6 `) T
template <>+ M% x7 N+ b6 M$ ?) u+ ?) J* j
class RunFunctionTask<void> : public RunFunctionTaskBase<void>* j) H1 J! Y3 U5 ]6 R8 A
{
. S/ D5 g" B% f* M- Cpublic:
" W8 y! C% _2 r+ Y9 I, q    void run()
3 P  l- {; b- a2 q    {
8 [% o) K: o+ c( D$ {& E        if (this->isCanceled()) {. Q3 E8 q( U% s8 y
            this->reportFinished();
% H) E0 V8 A& }3 n6 A3 q            return;- c' ?7 G3 j0 L8 n, n8 g
        }
  o7 M6 k7 |6 w6 l        this->runFunctor();& V! E0 f# A- @/ F
        this->reportFinished();' h9 t  e9 L) j% k7 g: {" D4 u) b
    }
3 N6 B: d8 P; \: m. y% {};) C" K4 |$ E! U; b
3 s2 Y. W* b0 @: z: @
} //namespace QtConcurrent# J9 W$ ?8 {+ Q

2 q7 y  R( @  i" ^! r1 S#endif //qdoc$ W0 o8 ?$ c2 b* u: E$ i

/ t5 l! G7 O  B; y# n9 Y6 ]QT_END_NAMESPACE  K1 t0 ^3 R; d7 y1 j/ g  K! C
QT_END_HEADER
. }* w7 P# l! M! U0 v/ I" M% ]- s4 p4 ]
#endif // QT_NO_CONCURRENT
$ u7 o3 F! L' F# J7 m) L# B' f1 Y0 ~1 u: f& {$ z6 b5 a
#endif
% R. @/ I' x& [) h, D# v. i* X+ t! `1 V8 I2 E2 i

作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
( w$ T9 W- ^: t




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