嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
# N1 P) [, m: Y2 x/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'2 t& T/ ]2 }0 k/ `; r4 {0 \
/ o* V7 R0 v5 m( z) l
这个头文件内容如下:
- c8 d! L' q$ K, w& ^#ifndef QTCONCURRENT_RUNBASE_H
/ i: P" D. U7 {4 D" W#define QTCONCURRENT_RUNBASE_H% L7 ~! z1 K$ ^0 u; F

# r& l( \' M3 i& C5 X! ~/ W#include <QtCore/qglobal.h>
/ @2 N  {) q5 H0 A) A' G4 K- f4 R8 U, F  f! e  M+ r
#ifndef QT_NO_CONCURRENT+ ^. c( u1 \- Q& @( ~+ ]6 b1 a" l
" j) [, a% ^. t( m5 H* x" Z
#include <QtCore/qfuture.h>6 G$ [; V0 p) q1 n' b) s, {
#include <QtCore/qrunnable.h>
( q- _! o) I! i5 v* Q) h8 ]#include <QtCore/qthreadpool.h>0 P' _% w, t% i2 M  s" f
: n+ s. @& X0 ~2 e# l- N
QT_BEGIN_HEADER& S' H' }. R  C2 E1 M
QT_BEGIN_NAMESPACE
7 y- F- `; _; x* V/ H1 l3 [  j% q/ `% R, Z* S9 Z+ `2 ?
QT_MODULE(Core)% X# j  Q! I1 f
! C" e, R5 A# h# ]/ p
#ifndef qdoc
# M, H+ t: ]- a9 a8 k1 U
- ~( ~, |+ s6 ]- x6 i% Mnamespace QtConcurrent {
% a$ O# G+ j' ~+ Z6 @
0 Y6 K+ T. J- M, gtemplate <typename T>  d8 e* [1 P+ x% m3 p$ E
struct SelectSpecialization
* h5 H- T: L& V; P: X8 A{! U" G2 h/ O5 W( M, s" `" i+ a
    template <class Normal, class Void>
  Q' P" I. C0 D# X    struct Type { typedef Normal type; };; @; ?$ F- c; J
};; O* S+ Q+ r. `4 m
7 n& F# d( J& H2 y" b
template <>+ J  D: u. ?4 z
struct SelectSpecialization<void>
* t. t; |5 ?, S& u3 s{4 _, `5 k  E/ ]$ _3 |+ ]) T3 h4 s
    template <class Normal, class Void>
0 j) g4 Q4 U2 q; L7 b' r    struct Type { typedef Void type; };2 @: [) w% a0 K
};
8 Y4 N1 n% F+ k* [/ b, Y: |) n3 n# P) c- o& E7 W$ @
template <typename T>& g" q* s9 w+ ^6 w7 K
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
1 |% R1 D1 Q, _" e, l2 r% D{2 P" M2 y2 ^- l# I( U
public:% q+ F. P! Y& [; T2 r7 C; T
    QFuture<T> start()8 y+ K: x  F% j1 u
    {2 U% g- Q6 i/ U+ ~' q: I) w8 _
        this->setRunnable(this);+ |9 B' f' e+ D5 ^9 l
        this->reportStarted();
7 p8 N* ]; s# T$ O& N; R        QFuture<T> future = this->future();% ~' B6 I+ `2 g" c
        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
; d- }2 z  z9 v- b, B( P' t        return future;
& G- M; |  ^/ k1 [    }
! z4 W; M8 i2 k% z* Z. Q
3 ]% a5 \; b3 I$ _+ O; C    void run() {}% W& u+ f! Q! F% O6 t% y
    virtual void runFunctor() = 0;
( V3 l& w3 M% m! V, w$ U8 X};  R& X8 b: z* B' y: B
( z, q) }) I; C7 `6 O" j' g
template <typename T>
0 k# l1 g$ I+ iclass RunFunctionTask : public RunFunctionTaskBase<T>
8 x# h3 w! v4 @/ l! ?{* _8 W+ Z! Z6 Z* b; P; P' C  k
public:3 B, h4 f" P* ^+ ~6 `8 c
    void run()- \* P) [0 U7 E4 Z
    {3 G$ T2 ^; J, j( F& J/ ^! C. f
        if (this->isCanceled()) {! X) \+ V: M+ g, M- h. }2 X
            this->reportFinished();
: c% a8 l) i; Q0 T3 X            return;1 F4 `  D# E3 L' y9 t: O+ ?( B0 i1 X- Q
        }3 j( ?0 x- U; R; x" `' q
        this->runFunctor();" P* o  L; k: @' g) x, ~
        this->reportResult(result);
  `3 e) B$ Q0 b6 D2 `        this->reportFinished();* |4 {% ^# ?1 C4 i$ e; Q5 p. E
    }; X( f/ n6 {, N: M5 W5 P
    T result;
/ E9 t& ?, g8 [$ G9 H2 @1 e7 {4 I};
5 C1 n4 l$ U5 B2 Y/ m
5 v; \  _1 X1 S# ktemplate <>
  ]) m% [- f2 I! kclass RunFunctionTask<void> : public RunFunctionTaskBase<void>- H" G2 _( E; r0 P
{/ N  |- F/ `, l. C: Y% H
public:
1 _7 F$ l: g% L3 w0 f# b# D$ v    void run()
3 P% h3 Z7 c9 B, E    {) T3 F* W7 V7 X& l% A) @$ T, _
        if (this->isCanceled()) {4 `- |/ f' N8 L/ H' b5 F( x
            this->reportFinished();& d6 g( j# Z4 W
            return;, U4 M/ ^' Q/ Q* A% d
        }+ s' t; _  p; M- _( o
        this->runFunctor();
' q, h8 Y" E8 n1 D7 |8 f$ Z( x; G        this->reportFinished();
! B9 e6 m) H' n  Q( E0 c4 Y3 |( F    }
& {" C' B6 N; u2 F) I* _0 V* F};7 h! c: }2 u" d) y8 \3 L# w! a+ U
9 E$ O. `3 l4 E" l% C+ x# k
} //namespace QtConcurrent
: _& X9 P! t# t% X5 N0 A4 a* @# u+ U
#endif //qdoc
; s: h; w( Z* }- [8 q9 x& ^! n9 f
% _" `2 x+ Z# ]3 y$ C: bQT_END_NAMESPACE
# ?9 u7 Y! T9 |" p( b/ o0 J( R! hQT_END_HEADER+ ~9 H  U  F: b

2 {1 j, ?" b1 s" d! G4 c#endif // QT_NO_CONCURRENT! |/ G# Z  ~' ?+ i# ^

( ~  o- g3 C, w* `! l% v( V- E#endif
! a9 l" a( u$ G, L  R
' a: Z0 M( B% I2 C( ?
作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
( y6 Y" P0 N( T9 |, `




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