嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:, D+ d( V* O8 b, j# W' J7 b# }
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'/ t- J& e$ E. z$ h
" Y: v9 k$ D$ h  _5 x
这个头文件内容如下:
* Q* H' t6 t0 {3 f8 }3 l4 m& r#ifndef QTCONCURRENT_RUNBASE_H
! W4 G! r$ {6 F& @( {2 _' ~* i#define QTCONCURRENT_RUNBASE_H
0 @- J9 p2 L% S* `" k! w7 `) U7 `3 y; y3 g0 V
#include <QtCore/qglobal.h>- ?, s+ J9 {3 d8 u8 L2 N; }/ R* r

7 K( `$ f/ a% z$ ]#ifndef QT_NO_CONCURRENT
3 n( g/ X# T. u7 U* r3 H) G1 P
# u" K8 T/ v& o7 R1 ^1 I# `#include <QtCore/qfuture.h>
. c) e6 v: w) F/ a#include <QtCore/qrunnable.h>  z9 G5 ?, A- _2 p8 ^' e# D
#include <QtCore/qthreadpool.h>
) n/ @3 y1 x: a9 F
1 o1 x4 r2 y' g* Q$ I5 FQT_BEGIN_HEADER
, F! ]+ |" ~8 y! A: \  n7 s* EQT_BEGIN_NAMESPACE2 o2 D4 R' x$ S+ ?: v

( v% @: f# u. O! k  I9 GQT_MODULE(Core)
, `8 \" T7 h% z
! O/ E; \5 d, u) j% q. J$ L' o2 r& v#ifndef qdoc& s2 h' m. G1 g' u; n/ u

: K# n( W% p2 \  `+ J& Inamespace QtConcurrent {* z4 e0 G2 [: L' x( J

. q* B  Y1 K6 s& Etemplate <typename T>
/ @4 c) v7 t' Xstruct SelectSpecialization' B7 z0 {9 b, N3 {: i4 w) ~
{
. ]; ]- f% [) v# m" y    template <class Normal, class Void>
: x- s5 T- M8 ^& y    struct Type { typedef Normal type; };9 q6 Y/ B1 ]1 M7 i
};. n5 E1 Q& e. E/ [1 m: k: u

" o* O# @7 G$ ^/ Jtemplate <>/ g# g* c$ G& I/ T
struct SelectSpecialization<void>
% M" ^$ U  p3 e3 r; l{
9 ~* U: }' ~; A    template <class Normal, class Void>* |( Y8 L+ [) }0 n9 D' _" p( k) d
    struct Type { typedef Void type; };& ]6 h0 V: m) \, _' N0 e3 E
};
7 s& V  [9 \) q" c+ n! H8 ?
( J0 y, }" H$ o* y; utemplate <typename T>
$ O$ w  Z; a) n' i3 rclass RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
( l5 Q. y" d3 ?3 ]* e1 x9 K  Z{- N( ?3 d: P  u/ c3 o
public:
# e" H: u$ ?, ?2 g+ F) C5 N, C) i    QFuture<T> start()( I- O" |8 S: W/ q) Y
    {
- ?  g1 l' s8 ^5 S& N& Z- _' ^( o! R        this->setRunnable(this);
2 _: Z! p7 S8 Z  y0 q4 [4 G$ H! w) `        this->reportStarted();
1 _8 m+ C0 g  u$ X1 A        QFuture<T> future = this->future();) a# _3 v& v4 }/ H2 G2 J( |. R
        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);# X+ h* h+ A: z* Z
        return future;4 [) U7 j# O1 N* l9 u* r
    }( q! J9 u' i' N* s7 {

7 ]3 u( D; J* x9 _( v9 U5 a    void run() {}" V: P# j+ o& ]9 i% A
    virtual void runFunctor() = 0;
8 O; ?8 \7 B* P6 D};
# X" _' `' `( X
+ ?  C2 p$ }$ W, f1 v/ Atemplate <typename T>" j0 L8 X* x. _+ L
class RunFunctionTask : public RunFunctionTaskBase<T>
4 K5 `! R. y8 z: S6 b3 @  L{
% H- }% q. b% G) s7 Z  Rpublic:. {7 E. M0 w$ K! r
    void run()& k- V2 \# ?2 G; i1 L" O
    {% J% o7 g* i) K* R# a. P" U
        if (this->isCanceled()) {' O( i/ j6 ]) L
            this->reportFinished();% g' X0 }* @2 F( t" H1 b
            return;
' U' F* ^# p( Z0 g+ [* J$ W        }8 U0 z; q* \2 N; x5 D% O9 }7 D9 ?: I
        this->runFunctor();
/ W4 U6 \7 Z5 m( @, w) f. q1 }        this->reportResult(result);4 Y8 r) @- x" z8 S+ Q7 w6 w
        this->reportFinished();
3 f# A' B" N5 G' U  D    }
/ O- a8 o3 a- k# q( Z- P    T result;5 T4 Z6 r$ f) N- I4 \3 M  {9 K/ I& i4 e
};5 p& Y7 Y& D. H
; Y* y& f# ^/ M( R. F
template <>
0 T/ a# M' D- |class RunFunctionTask<void> : public RunFunctionTaskBase<void>7 A" G) c! u+ H0 t9 ^
{) X; @: K% n% e6 S4 X, H  j
public:/ |7 Y/ k; b) W! A
    void run()% O( U9 |! v9 V, {
    {! a4 M$ |" P" l* H0 r
        if (this->isCanceled()) {
" V9 n: J8 }( y# ?' T# O            this->reportFinished();5 i3 C7 v) q2 k; q& k6 @) Q
            return;
% p8 `, `6 S) \7 z: x        }- c  F5 P8 F" @9 m+ M- L
        this->runFunctor();: b# x# i' ~6 J
        this->reportFinished();
" N' @) T2 j) Q; u    }
6 J6 j0 e" B, V6 k: ^};7 ~# N) T) U: u' z' z
0 Q' D( \, Y4 |' F, e2 y2 `
} //namespace QtConcurrent2 k$ @( x9 ~+ Q$ w

! i5 l: g& g7 S#endif //qdoc4 x- {& L9 b$ n, _5 U4 Q( P$ H# G

* y3 X/ z3 Q; z# v& KQT_END_NAMESPACE7 a( n, _" E& ?9 t
QT_END_HEADER
: C, c4 F# ?3 e# c
3 V' }& j0 t3 g#endif // QT_NO_CONCURRENT! r- p4 C0 }8 A) I
: C# v, D3 S# Q( G7 r
#endif& f) v! j1 o2 Q) X; ^
! \" g, O: }+ N& j" S

作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
: Z8 S5 o- e  }; [




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