嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
0 ?2 o8 C- I5 {+ C2 }  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'' `1 ~- ?; {3 @9 [* k* q- q
" b6 g0 V# m" o4 h' V
这个头文件内容如下:7 C0 }) L; w5 I
#ifndef QTCONCURRENT_RUNBASE_H8 T3 F6 t$ R! E& z
#define QTCONCURRENT_RUNBASE_H
% p8 `% A8 u; [, F$ e
% O# [7 z1 H3 @#include <QtCore/qglobal.h>; l. _" t5 P8 c/ X# Y. n

( t* t8 A0 G5 |0 l, z, Y' X0 r#ifndef QT_NO_CONCURRENT$ c9 R3 Z7 t9 l6 b0 i/ \1 b

0 x1 t% W9 s- J# V7 O* t! q- E#include <QtCore/qfuture.h>( G+ ?- O% x0 F/ u" u3 {1 O, w. x
#include <QtCore/qrunnable.h>) l1 X. H  ~  _+ O; D
#include <QtCore/qthreadpool.h>9 t. U" ]& y2 v& a! _- T
- V2 j) P' ~* G  S/ r  e
QT_BEGIN_HEADER0 b8 k/ [1 G; O0 g
QT_BEGIN_NAMESPACE
: A5 b' D- p9 m! w- U: x; i3 ~! J7 f2 g1 f( t$ R
QT_MODULE(Core), m4 [0 L1 C* n+ G4 d$ w
2 Q3 Y" z2 F% K& y- C2 M: l2 e
#ifndef qdoc5 R: x9 _/ S+ T. r6 r) y* @

6 c/ O0 E9 h: a/ v* {1 D+ }namespace QtConcurrent {
2 ]9 F! ~. ]+ J
3 e6 {7 }+ {0 d3 O. M$ Htemplate <typename T>9 s. T: ~& T& j6 w) k: i1 y% l
struct SelectSpecialization7 |5 I2 n( c. O* p% z
{3 o9 T- {% C0 g$ k- g& k( D3 N# O. ^
    template <class Normal, class Void>1 X* f) P4 |2 |+ m" r+ W" M
    struct Type { typedef Normal type; };9 R$ E2 g3 {9 x
};
& ~8 k/ T3 j3 D
8 _, w( P# [* \template <>  a0 C$ i6 D  c" Y, e0 A
struct SelectSpecialization<void>2 `) |+ G7 f& V# A; S1 \: r6 l4 \
{
9 B% E8 q" ^- {+ C    template <class Normal, class Void>
! _1 l' S- S, M1 h0 L( b    struct Type { typedef Void type; };
& ~( R5 W9 P: m1 z+ ^( d' ~};7 s. r4 L3 E- p

2 i: [; `$ l' L: V# Ttemplate <typename T>! \- M  d! T8 j) }; X
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable! f: }2 E& x0 k* K  R3 [* k
{
: Q$ m) q* r0 g; P" ipublic:
3 m: H. I& q9 \1 }5 C    QFuture<T> start()
2 p9 E* {# Z% ?: i0 i( k    {5 v# b! k$ }, x+ o
        this->setRunnable(this);
; T+ i, S6 t" `) y5 t7 h7 y9 h" O. T        this->reportStarted();7 l( Q% ?. e) F7 X, k7 e
        QFuture<T> future = this->future();5 q6 ~" b' r% a/ J2 j; y$ T
        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
5 _, l6 }/ o0 V" n7 h: W        return future;
5 O0 N. o# E. h9 N1 r9 w    }) U- q- k6 ?! o( B3 M. K

+ p% E! ]5 g) N4 X$ W; E    void run() {}
2 G. H7 l5 V# I    virtual void runFunctor() = 0;
9 V1 }$ |: r2 y' X# U/ R' e$ G};
. ~& Q3 u; g0 \- Y4 r# c9 z6 G
% o# s$ V6 d* p7 Ftemplate <typename T>9 F& c. F7 d& t& q
class RunFunctionTask : public RunFunctionTaskBase<T>3 f1 C. I" d2 r; w
{
% l5 ^6 [& t7 f7 w0 S# {8 lpublic:
, e' F0 A$ P& N  E5 K    void run()5 x3 I: A& ^! r, [" P3 l
    {1 [# ]; a/ v/ }0 c% G/ q4 b% p$ I$ y
        if (this->isCanceled()) {
( K* {% b5 t' c* S            this->reportFinished();
/ Z/ I1 ?0 V% p. [9 v3 E            return;# F% t/ m( E- o; m8 ^0 s
        }
& y" ^) J: w- h, b  V        this->runFunctor();
- ^& a  b) b$ H& L        this->reportResult(result);
. M$ p! ~1 c/ ?8 M3 Y        this->reportFinished();
( {8 X9 r: X! p9 g: l    }
, k1 V8 s: Z$ v; V1 L! U8 z    T result;! _% R& Q2 e6 W5 v  Y8 u& x
};6 T2 ?/ [7 U( j/ \+ `
+ _. \5 B2 u6 j  T, E: E
template <>1 R3 D$ i5 u0 {
class RunFunctionTask<void> : public RunFunctionTaskBase<void>' E7 _# x' f: z. w/ \: L
{
% G, b& h+ w( |9 p! C/ }public:
$ k8 r. u0 |) }6 k+ @+ B    void run()
2 [, K! x* R6 _3 Z    {
/ @" m2 M( X7 j; y) i/ K. X        if (this->isCanceled()) {
' e  w+ P0 A9 s0 [5 P! i' H            this->reportFinished();
5 W* S1 k- ?) V            return;
# e- Z& D  Y$ B* C$ q# J  j# m, ]        }
( i, Z$ ^0 h8 R* G        this->runFunctor();5 L5 z& v6 G6 n, i
        this->reportFinished();. \2 e& Z/ J: N; k  A! _4 d3 ~4 R
    }8 Y2 g/ b" D0 H6 d
};
: e% X& ?% D( e2 z2 R" X* v0 m; G& d, b6 w
} //namespace QtConcurrent2 U$ c; T  P* u
+ Z' D9 R  X$ P- x9 Z: L
#endif //qdoc
9 ~$ _2 D0 S3 W* K9 W- G' c1 r1 o5 I4 z. d& \. ~
QT_END_NAMESPACE
7 e, ~! h; G5 O( QQT_END_HEADER
( T0 V& f! @& z0 V5 v) T$ d
1 s# E) q" Z- c5 }5 G$ h% Y#endif // QT_NO_CONCURRENT
1 v  w3 F7 q) K, J: y8 N$ L3 Q$ f7 S
  a2 t+ k9 ?& R! p9 S& u/ V#endif& h8 V3 E7 M! o6 F! H% t6 E  l; s  @
$ p5 x/ c! m( O" @- ^1 ?  l# n+ l( v

作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?+ j; V6 r; G* c# k6 O





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