嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
- ~4 N, b! R7 p" j5 v/ F/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
, R- g) `" K' p' j3 s7 q+ D1 C
) o1 `# F* V6 A1 B3 q) I这个头文件内容如下:
3 L9 n* X8 r" Q3 @4 V, e#ifndef QTCONCURRENT_RUNBASE_H
6 G  V# @( Q9 O- y( E( d#define QTCONCURRENT_RUNBASE_H. U) y1 d/ ]: q
. Y( z2 S; m  N; c' k3 P( t
#include <QtCore/qglobal.h>
! E$ }% o0 v" R, y0 D& _7 C% z3 c' B5 H4 S/ W0 V1 ]7 }% w
#ifndef QT_NO_CONCURRENT
( F( `; }/ G* W1 R2 x9 I6 Y+ C  K) `! n! L
#include <QtCore/qfuture.h>0 l* ]* K& B# z# Y' X: g5 M; C- j2 _' z
#include <QtCore/qrunnable.h>5 U7 q' w4 c% n$ d/ o0 H+ O. l
#include <QtCore/qthreadpool.h>
3 l8 x; [5 m6 O
8 t6 b5 K! ~3 m- lQT_BEGIN_HEADER
5 ?6 g0 f+ r; s& e! UQT_BEGIN_NAMESPACE
% W" T! [/ ^# y6 i4 S3 Y( t) b) X4 _
QT_MODULE(Core)
7 l4 J& ~. L/ U  q. D$ |7 u
6 J' h; B( f! I$ j0 Z#ifndef qdoc
  ^- X, r4 ]! _$ g0 e! Q
5 M* o! i; N& @! D! _4 Znamespace QtConcurrent {8 K- L! A2 y( R% `- Z# a0 M
( ~6 {- B# |3 x' J$ H1 u
template <typename T>
% P1 ^" I3 ]0 p2 `: L% astruct SelectSpecialization
, h( v1 s( I+ h$ y( p{
0 @' @" R( [+ h# P* W6 U% |' H    template <class Normal, class Void>/ R. _; Y5 c* O% N
    struct Type { typedef Normal type; };3 ^, v4 Z! r; x. N7 |, H4 I& R
};2 U6 j3 W, R) Y
7 [# i  ~" x/ Y$ }9 o
template <>8 x( l5 E0 g( C+ f6 M
struct SelectSpecialization<void>  X; U- D1 q. ^2 E
{
. Z& i& y/ n9 {    template <class Normal, class Void>
% u5 z% z" V1 N    struct Type { typedef Void type; };6 S! L# ^& g: e- Q6 j. t
};: l: B& V7 E+ n3 t) m

8 z/ i7 Y7 A3 y6 {0 D) V3 e! {template <typename T>
- @# Z# Y! ]  x  S/ P1 ]class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable: {% d' R  V5 W/ ^
{
, {4 D: S( g8 ~  P9 i/ `- ipublic:
4 i9 Z) J8 ^# n    QFuture<T> start()/ `& ?; P2 O0 h( Q( H
    {
' d- G9 H6 y4 J1 ^/ W, C        this->setRunnable(this);5 K* O9 a% n4 y, e0 _2 s% a6 R) F' T
        this->reportStarted();2 d' T2 y% m; _2 ]+ Z/ |* a# N. k8 Z3 M
        QFuture<T> future = this->future();' j! f6 r. R! `
        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);) g! O" h) h; U7 J1 I
        return future;
2 m! e9 y3 r& s9 A, M, R+ F    }
3 a3 J1 Z( n* m+ K- e  ^
$ t$ M! ~) [8 H* I    void run() {}. G8 T3 t4 i4 M0 [: o, Z) D
    virtual void runFunctor() = 0;6 w. j" b$ F2 R. [
};
+ x9 g& U- Z. K! `* f
- d8 p# T; F" w% c7 W5 {template <typename T>
% l$ R' a+ E$ ~0 Rclass RunFunctionTask : public RunFunctionTaskBase<T>. I3 c& [' j4 T2 M9 j
{8 V6 D  s) V: \9 W% q
public:
8 e8 _: [" d$ s, i- Q) D7 H' I    void run()
+ J2 c. Y; J1 \9 S' U% b  d* N    {+ H2 k* t( B( L. n  I% \
        if (this->isCanceled()) {
3 v8 ~% w  r  u3 W4 N2 J            this->reportFinished();
' M& b. z1 Z+ V4 ]0 A) G, J- P            return;3 ^8 L: g6 J& V3 [- @$ Z
        }
" V( c" d0 a" x        this->runFunctor();
- x# `# P( f: {1 C* Z3 ?        this->reportResult(result);
& S/ L2 _. ^( R# V7 T/ M; L: V        this->reportFinished();
6 Z  N  X' e7 C* z: {- U6 }$ H* J    }
; J$ e, d' o; b7 J' j9 ~$ s    T result;
% k" ^& r# G3 `. ?! _};
4 I, m7 e5 B6 }) z! J+ K! A: g3 i( s& P2 |6 c0 o
template <>7 E* [; x' ^( \; p1 A9 v
class RunFunctionTask<void> : public RunFunctionTaskBase<void>! S* B; D8 i" X
{
+ n& s" v) w- r& O# Q) Epublic:8 f8 G" L! M9 _: u4 S- c3 N" x
    void run(); Z" m# B, ?- u6 ^. E& o4 \
    {
/ @7 S8 F# T5 ]! t- y3 S0 b        if (this->isCanceled()) {
0 y* `( s2 c# l+ `+ }            this->reportFinished();
2 \7 T5 B6 ?3 Z$ B' Y$ g            return;$ L6 e  e, |2 a5 j
        }
% H0 h0 M1 L) }$ }- C/ L        this->runFunctor();9 _+ f* i! l1 l0 S
        this->reportFinished();! S' f- p5 x9 z! c/ @* K/ `
    }
& O/ J% b% d% q6 r1 H};
  k$ c$ ^: @+ q( m  S3 p
. V, k' R* P% {, s- ~, A' A3 \} //namespace QtConcurrent- g# [9 |2 d" l4 h4 ?

  F/ n$ X" M2 V  m5 X#endif //qdoc
' j" Z: A4 o8 I6 D/ l) d+ T5 u. ^5 ?) ?! U' A- @9 {  ]
QT_END_NAMESPACE
, D0 I1 z: C1 ?! vQT_END_HEADER4 i0 q! t/ [- ]! p( I2 o5 ^+ u

5 T1 C2 E* @" I% e! p#endif // QT_NO_CONCURRENT
; V7 {0 D) G8 M9 n# L
6 g6 e7 k3 e( `9 C$ O#endif
. o- G: u; L/ D; {5 X/ X/ A8 H# X

作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
1 u" m7 @& H( j5 M




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