嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:1 x; |: w% b) a- W& w
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'6 {; {1 K& R! a! K
8 t, F" f7 a% K
这个头文件内容如下:
' F# t- ^8 k* G. O; T#ifndef QTCONCURRENT_RUNBASE_H
3 @  ?" U$ j% x: u#define QTCONCURRENT_RUNBASE_H
6 c, U5 t9 d) M" B. B5 Z9 i( \- Q- ~9 x- I! Y) C0 L. W
#include <QtCore/qglobal.h>
3 B( h2 h3 E& _  g
7 R% g& |) J5 \- n$ L8 ]#ifndef QT_NO_CONCURRENT
; }) Z1 r( @7 i' A  Z% t6 r* w5 s
9 V: a  t+ o: |( J" D#include <QtCore/qfuture.h>! J4 c9 ^4 D1 F2 ~% L5 [4 n
#include <QtCore/qrunnable.h>
2 f$ Q0 ]7 ]! t7 _" [1 h& Q' e( _+ B#include <QtCore/qthreadpool.h>2 _, T2 }: Q8 g+ ?4 X% u

2 D3 [& Y4 I/ W, ^$ R% v6 j) \4 gQT_BEGIN_HEADER0 e* V/ |2 P1 `/ z7 b3 E* {
QT_BEGIN_NAMESPACE
5 A; s5 r, r4 R% j+ _9 j5 k: g, K1 @. ~, |" C0 k
QT_MODULE(Core)
/ K1 J' M3 L# _* |, q0 e0 h
2 W! G5 H! ?: e) s5 Z#ifndef qdoc
( R, ?8 [" N$ m  _6 C' a% @5 D$ \$ k
" U4 ?1 E& s( K  @namespace QtConcurrent {3 X! z$ {1 N9 V' S
& F. u9 G+ z- P& Z
template <typename T>. j, P! y# n; h7 ~2 A
struct SelectSpecialization5 S7 _/ |  B) g1 y" t; p* ?
{; O1 B, E6 e0 J! a
    template <class Normal, class Void>
/ Y) o; g8 @5 q    struct Type { typedef Normal type; };2 q# p  L+ _8 F0 \
};
. D) K- N8 C( e! ], m( H+ n# U8 W2 o  B9 D8 t4 F" B# m& g5 b
template <>; \& O# I9 v3 m  R+ h/ c
struct SelectSpecialization<void>
3 H( y. |- |+ ~% c8 |" \% h{
) J( n) ^( ~8 Q9 A    template <class Normal, class Void>
- s- v! J& R( ]5 A    struct Type { typedef Void type; };
+ ~9 P8 v* D+ ?) w# [9 p  _3 j( F};
3 h+ H: Y  ~7 Q1 ~' ~
* Z" c' j' B3 A8 b. Atemplate <typename T>
0 N& E% r: K0 ^5 C! C& Wclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable( C/ n! k6 C# P! n- V, q! \
{1 a1 _4 i$ W9 K  B8 s! {' V8 O
public:% A- M# }" V3 R0 c; w$ a. O/ k
    QFuture<T> start()
1 r3 C' Z4 K. d, M0 X% m8 K    {
$ _& x2 P( V% K$ p- e0 ^/ L1 u        this->setRunnable(this);
3 ^! x- P9 I8 s        this->reportStarted();
9 `3 d/ z0 d! |  _3 q4 l        QFuture<T> future = this->future();. s% b8 Q  E( ~& B  Q' K
        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);- d, b: J: u- Q
        return future;/ y7 x0 o8 W- X! m* d* q& s5 |
    }% _7 S; \* y: I) `

3 ]0 C9 d. O3 m% M& w2 u    void run() {}
' v* g& T" n8 P5 Q" Q; ^7 D    virtual void runFunctor() = 0;$ J1 x$ S* E' x  x) k2 ^: }+ ~: [! l
};
* z4 w( ]9 {; q  ?
& f4 h# c& {7 A$ Q* |template <typename T>
' j& f; Q# R8 U7 V9 Wclass RunFunctionTask : public RunFunctionTaskBase<T>
) B. [9 p; |9 r! E{5 g8 X8 W3 v, o8 V3 Q& m5 b4 J
public:4 y$ [6 A$ n& S5 M; T
    void run()
7 `4 R0 N0 O5 i, ^% L4 y4 v3 E! c    {6 w* X, O' P  U5 P
        if (this->isCanceled()) {+ O( `- Q6 Z! |, B3 j: @
            this->reportFinished();9 m4 }( u$ L- t( P: I
            return;
6 t5 k" O( O: I' X6 C6 N/ A* r7 o        }
: W- n' u( g( L! G        this->runFunctor();+ g8 d* C( ~, N! }  w7 L
        this->reportResult(result);
+ n! Y6 a% ~0 Q' k        this->reportFinished();6 m0 Y* U% M9 i# K
    }
$ \4 f+ p. d' D& I    T result;
4 h* }  h: Q6 v};
$ F( N4 s8 t, V9 X* ?) M. O
9 G8 z" u3 f* _8 X7 i% q( Ctemplate <>$ o. w8 p( T8 ]1 D% S2 q' k3 O9 S. f
class RunFunctionTask<void> : public RunFunctionTaskBase<void>7 F3 I/ c7 @2 ]# \. Z; a; X$ s
{: O" z' `$ t3 o; ^: a+ F
public:
9 D; g4 |  r% ]% e5 j5 F/ ]    void run()
8 h% ?" _% |) [. l    {. T5 A# b( x+ A, V! B! x7 B1 b
        if (this->isCanceled()) {5 o! g0 \9 n4 [# x+ W
            this->reportFinished();
$ U/ @2 K4 q( B! ?# I/ o! ^            return;$ m+ L+ Z2 v; L
        }
& }, T1 B4 A# G  T/ E/ G7 @& j" Z        this->runFunctor();
- B% H; A# {, J) @  K7 e$ \        this->reportFinished();
; W9 b+ I! R) p" o/ f) ^2 R1 f    }. O4 ^8 E. ?" B" h9 Z, ]
};& U7 ^* K% T3 j, Z  G  E  {8 K+ _# J

# l0 K8 E% L/ j/ H4 W} //namespace QtConcurrent
1 a; y& `& d" \- E2 u) y  r) _
+ i# w' U, _& k, m3 t* f* Y, G& A% ^7 j! V#endif //qdoc
- t# T& ^4 C4 v0 A( L+ q
5 @9 R0 c% Z# t4 S1 U6 B1 f* I$ }4 MQT_END_NAMESPACE
0 u+ B& o1 B5 [( kQT_END_HEADER! v7 n  Y/ ^6 i; r: K
) M2 ~- h  W/ l7 n' u
#endif // QT_NO_CONCURRENT
5 n+ I8 V+ I, n$ X% d
7 z- I0 h! Y1 A( X2 g6 O- f#endif$ P0 z; X( m& d8 |

8 e( A* j2 T4 n8 d0 s6 {" v
作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
6 E: r2 Y; F3 @




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