嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
" F+ P% R' Z9 \& g/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
5 _5 q4 Y2 \' W" n5 T/ z$ J* A
这个头文件内容如下:+ ^" X' ~5 _8 s* T6 U
#ifndef QTCONCURRENT_RUNBASE_H
) X( Y2 g: x$ J2 {& \1 s#define QTCONCURRENT_RUNBASE_H* P( k9 ^4 Z! }. ]+ Z' s' [) u2 M
/ m* W0 C* u# t
#include <QtCore/qglobal.h>+ l- J( c2 r9 A$ R  y
1 T9 g5 {( C( o
#ifndef QT_NO_CONCURRENT
  S* K' X8 N) G
3 U1 z% ]; T% q#include <QtCore/qfuture.h>
3 b/ D  j) S6 L# W#include <QtCore/qrunnable.h>) s, p  I3 r, G& U4 U+ m
#include <QtCore/qthreadpool.h>5 @& t1 i( E* M  o3 V

. ]* f" [% |6 i4 M' Q: G; eQT_BEGIN_HEADER
/ J" _+ M) d- j9 |3 o+ F4 ]QT_BEGIN_NAMESPACE, @3 J0 e$ Q  z2 H# r+ s

$ m5 t: L( v2 a6 x! T# mQT_MODULE(Core)
7 ^8 N" Z1 a3 }3 x# T% X
6 W3 r, O  r. l, X$ O) J1 @. f#ifndef qdoc
& d6 b2 N2 m2 p( E) h% t0 K5 K& G; B! t$ {8 N& g* m
namespace QtConcurrent {
" N$ ^" q4 F- w2 L- L& |# {& i+ t- f. ~( i& w4 t
template <typename T>: M6 B) A6 w7 s+ ~4 R2 A: F
struct SelectSpecialization
4 |6 C( C' p2 H& B9 [; K{
7 m0 ], U, w) y, z: S9 j' D' f    template <class Normal, class Void>$ P7 S6 @2 x* }! C
    struct Type { typedef Normal type; };: l& J' i( _0 x1 W* Y- n( X5 a
};/ P1 X8 {* w* ?2 S

, D# S0 |; r( Rtemplate <>
7 F. g) Y+ Q5 G, p' j6 astruct SelectSpecialization<void>1 M* G, W* c) C3 q2 i! I
{4 W5 J3 a0 i) s$ |) G
    template <class Normal, class Void>% Z3 S6 m9 q6 h' [# t; Q
    struct Type { typedef Void type; };
7 [- r! b, J2 }$ S! Y& e};
; S5 A5 l  i/ }, p9 v4 H( _9 t: ?+ @- Z6 ?' R6 @" |
template <typename T>
0 g$ x. B$ T. Z& B. V  sclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable% N  v$ F; A) u1 t7 R8 K. S$ y
{
# J. A) S, U8 b; S" P8 F& m0 u: }4 fpublic:
; C$ r. ?) I" t" M8 h; I    QFuture<T> start()2 y( r  m# n3 a' q2 p! C  g+ E
    {
* g7 Q8 N1 r0 j. I5 f  w        this->setRunnable(this);8 Z9 a  M: w  L" T1 j" n% _
        this->reportStarted();
/ l) y+ _  h2 B        QFuture<T> future = this->future();
5 ]# y& F2 k% n$ @  ]        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);+ k% Y, n# R, f8 b1 a7 o3 V( N; g9 F
        return future;
- v- f  u( l" e6 o    }
' ?! E/ K# t/ J6 Z/ p5 F1 k5 V* A; ^" g/ U
    void run() {}9 ^% S5 j3 R) ?* ]4 b9 D# S
    virtual void runFunctor() = 0;' B) i$ d% R% d+ i3 o5 @
};
( `& [$ j2 M. P
( R9 Y7 }8 q- v% A+ J5 Ftemplate <typename T>
2 u6 l# S+ A2 q5 Vclass RunFunctionTask : public RunFunctionTaskBase<T>
$ y+ `- t, b) `* h* r{
0 {* ^( W4 b2 V6 X& Upublic:! k: |1 W& k2 E) b+ \
    void run()! E; D" H1 i, P
    {
( D, u, @/ G, W+ z        if (this->isCanceled()) {/ @. Z- N* j0 p5 w+ z7 |5 q1 c  l: ?
            this->reportFinished();% G- A" k/ r! A0 H
            return;# I4 H& ]; a* \: r
        }
0 r1 n$ i$ o. H9 [: z        this->runFunctor();
( Q% W7 v$ ]) J% \5 j0 Q2 x3 x        this->reportResult(result);( Q. a6 ?2 Q6 Z2 M" N# c
        this->reportFinished();
' a' d4 B; w& J2 f  i; U    }  \6 c7 J6 }6 z" S8 a& q) B( r* u
    T result;
. B: J) x* L& r5 u6 ]2 v};
4 Y2 G) P# ?: y# v- G/ x* h" W, ^7 t8 x( j
template <>
6 @# I4 w1 m' H8 P; @0 ?class RunFunctionTask<void> : public RunFunctionTaskBase<void>
, _3 L( a- v9 ?3 x( y* s{
' i1 Y/ v% ~+ Q/ |0 v( K' |% Lpublic:+ @( A$ z2 l  D3 Q( ]: Z
    void run()
* u+ v0 S9 V3 {4 P1 G    {
& j+ ^+ o  j& F) c1 S9 A& V        if (this->isCanceled()) {! L% Q6 h% O9 ?, _( D% Z  c2 d
            this->reportFinished();2 N! c& x9 I! t" h6 u
            return;6 _% h. r8 E( I* j4 [0 X# K
        }
* s1 p% F% [( t3 \4 N' o  N        this->runFunctor();
8 o- ^4 U' R1 `6 K5 Q/ x        this->reportFinished();9 Y7 |- k9 _) K' X! |+ j! h6 |8 R
    }
( P; R& e" g4 k};) C5 n' ]  L* Q, {

. c  T$ X9 o7 c  E} //namespace QtConcurrent3 D( M2 e% u! I" [5 ]4 D* y; }

6 w8 L* F& y& i6 r' t) U#endif //qdoc
9 f& A# t% ?5 V4 @/ U. y. C. b8 B9 A5 j. ?- [
QT_END_NAMESPACE
  G) R  M/ S6 w3 L% jQT_END_HEADER9 V) r9 B) H+ G8 n9 u
9 k7 z3 `$ ~" k2 \7 h- S/ o
#endif // QT_NO_CONCURRENT: U' j* J) M7 ~; i# e' y6 n& K! [

7 C* J8 l$ I0 x) L#endif
7 `; Z' l1 o; G" I) ~( Z! J
6 H, @5 y: l4 o7 d: P2 w$ ~
作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
4 B# Y: ]$ w- G  r




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