嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:# I3 K4 M4 A1 E) H  O
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
! h6 D: S( D' w$ ]  ~% f# M: Y& [
这个头文件内容如下:
, \) S0 y/ \/ [6 m4 U0 N#ifndef QTCONCURRENT_RUNBASE_H4 D0 N! z& a  j7 U8 o2 ?
#define QTCONCURRENT_RUNBASE_H$ q5 r1 O" c% _2 A. {6 S
, {" u5 K6 _$ _1 N- b
#include <QtCore/qglobal.h>
" K5 ^2 k, t/ O4 g& F5 Y/ D2 t& A( d8 p3 ^8 @. |3 K3 n7 i
#ifndef QT_NO_CONCURRENT
+ H. @2 t" I  ~( l' }. Z! j* t2 X4 U8 b8 s5 Y  O
#include <QtCore/qfuture.h>4 ~7 d* U$ M% _' G, ]
#include <QtCore/qrunnable.h>  Z4 d9 w$ n1 |4 j8 R4 A, ?
#include <QtCore/qthreadpool.h>
2 N. f- ~, P7 p3 w8 D" e/ m
' M, {& R+ j* t8 mQT_BEGIN_HEADER
, X' I3 P; e- F+ s9 ^8 kQT_BEGIN_NAMESPACE
  ]) c* n! I$ g
& N+ q9 M7 Q" ?QT_MODULE(Core)1 e8 E# F# h, S, c% E

( D8 o$ D4 ?4 @7 I# Z& p$ @#ifndef qdoc
: l9 l' K6 N7 ?) t, P
" {  e! v$ @4 A( D  b8 _namespace QtConcurrent {7 z! k  l$ ^# x7 G

0 ~" V0 Q: H: M; ?. Q9 ?1 G4 Ptemplate <typename T>
- ?: K7 P( M& Z( f  u" Ystruct SelectSpecialization
% i/ C' X, {2 B. V5 W$ `{
  b$ E$ E" C# u: ?& V7 A    template <class Normal, class Void>
8 X' f9 t7 c, @" n7 t. ^1 Q    struct Type { typedef Normal type; };0 P0 v. R" X" c* y" g! m4 B
};
+ U. f6 u, d; w- r% Y) i; C  w" [! u" O( h& u) |+ q
template <>
6 ]& E- S7 }5 gstruct SelectSpecialization<void>
+ j5 Z: L- i$ y% ~{% r7 U; [7 z) Y7 y' }
    template <class Normal, class Void>
/ y' Q& K8 d: W; ^- K' ~! C' O" a    struct Type { typedef Void type; };6 c8 B) z& i* F( [0 }0 r
};! J0 M! s7 y& }! V9 f3 Q# z: R
, K& G, r: H" S' U% u
template <typename T>
" m1 z7 ]* o6 b( x! V( qclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
& n& D, E0 @* y# p5 A: ?- \& v& s{
0 z9 a# Z' B1 ?3 ppublic:9 ~. ?% F0 q* [8 V
    QFuture<T> start()
. s6 [; @# R+ H  O    {  t' `8 y# J) X0 n! y
        this->setRunnable(this);$ ^) R/ E; S2 N/ [! t1 x
        this->reportStarted();6 Y3 N; @8 z: X, }4 v
        QFuture<T> future = this->future();
( o* p. K, ~6 o5 w5 ]% w7 E        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);6 t- h4 L4 c- b4 g
        return future;
$ ~  L3 ?+ F9 d    }  Z( g/ E3 ]3 `* Z2 E

/ T2 A7 `6 D, W' k2 ^    void run() {}* B) ~6 L0 z: f9 b* V; {6 j
    virtual void runFunctor() = 0;
+ ?$ c. \& f$ i1 E};
7 C* k+ a) _2 |& N% [- Q0 X0 D; {, k% ]
template <typename T>
; G! @( b$ z9 {0 G* V1 }8 Wclass RunFunctionTask : public RunFunctionTaskBase<T>; c( Q+ {" }2 g" l$ g! ]3 v
{
2 z5 D8 d+ p) e8 o1 B% m) D! apublic:
' P- E$ J0 o# b( S/ U" g1 X! _, @    void run()
- ~4 p1 n% R8 G2 y    {
( E9 _( y2 }* u7 Z7 c# R/ A        if (this->isCanceled()) {2 F  Z& |1 ~( ~# h- h9 m
            this->reportFinished();
3 ~: i( J* h5 u: M0 k7 c6 H0 ~7 o            return;
1 ~5 f: Q2 ]( b! l- ]+ H        }
* d' R2 P4 n7 S* R6 A' W% p        this->runFunctor();& S( w5 f2 `6 v) }
        this->reportResult(result);4 O2 b' `4 a7 r. c, v0 Z
        this->reportFinished();
7 R+ p: |/ f$ E- @9 p0 z) B    }; H3 O1 Y0 W  b$ P
    T result;
7 O5 e7 C, c! Y/ p* N/ h};
! j" s3 ^& K0 S; Q+ M: P* O7 d! j  k! Q4 T2 S' P
template <>
7 ~. P. J! e  ?class RunFunctionTask<void> : public RunFunctionTaskBase<void>
3 C4 C7 q0 u6 B  k: n$ F  v{/ _2 c1 v; P4 @
public:* S  f  E9 }# S! F% H7 c
    void run()
3 K* `. D: U. ]# v# s( u3 g    {5 i- l) c7 e; \! i& ^
        if (this->isCanceled()) {" i$ a! D. @. P3 X! J' {) y& P7 @
            this->reportFinished();
7 i- ?3 J; \+ I# f0 D) ~) c            return;2 J3 J3 i+ b0 ~2 ]0 z
        }
9 [! \1 ?  R0 d        this->runFunctor();
6 i3 i* E/ R) U/ t        this->reportFinished();
( I- R: F9 d; Y    }
" Y+ \) w( Q& f};, J- x8 i! b5 T

: W% _- H; t$ F& f% s9 P} //namespace QtConcurrent
" J* H! M, g. D7 w
  Y  S) \* }1 A#endif //qdoc
& Z0 w5 d, K# c2 b/ i8 p! R+ g) I; L  E8 E! ]* [0 ^; S6 y
QT_END_NAMESPACE: G. ?6 B( r# ~3 k  [
QT_END_HEADER
4 S" |. d  r$ e% `* H1 h+ |0 G! x0 |& `* @( V
#endif // QT_NO_CONCURRENT
3 i- ?* |5 ]0 l9 V" ^& I) p* }, v
#endif
6 K7 m$ F. a, |& [0 ^% ~
* Z2 H& l' S$ t% X9 n- r$ Y
作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
6 u, s# V+ i5 S




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