嵌入式开发者社区

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

作者: smallknife_hb    时间: 2015-1-12 14:22
标题: 交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
7 |: T7 O  H" M$ E/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'+ |. I( E4 }1 i; v+ b, Z' d4 h
9 P+ h' a% _0 z* x
这个头文件内容如下:/ R0 ^% ~; s# B/ \9 r7 @
#ifndef QTCONCURRENT_RUNBASE_H2 q/ ]6 F/ R+ i8 R+ n9 u
#define QTCONCURRENT_RUNBASE_H  `0 F0 d$ k; a8 z

- h9 \( l. G5 s. i/ P" G9 E#include <QtCore/qglobal.h>
4 L5 W9 ~1 N# ^9 J$ [: Z+ F0 f7 y* A! Q: D  p- R1 G. d4 X6 P: G, E
#ifndef QT_NO_CONCURRENT
: T' `* W7 q4 F9 ~; w% s6 b9 O2 \- W6 @! J3 C4 E5 Q2 d+ M
#include <QtCore/qfuture.h>
5 H: Z% |) j7 E# E  Z7 V2 I#include <QtCore/qrunnable.h>( ~1 B) Q2 E' A
#include <QtCore/qthreadpool.h>1 h/ e; _6 H" q8 C

* q. Y  Y% j% }* ~& B6 B" EQT_BEGIN_HEADER& l+ _) e3 k. [: {$ ?  U. P
QT_BEGIN_NAMESPACE
# F! l# X( ~! N6 P1 [: H4 N  g* K% Q: g$ l8 m
QT_MODULE(Core)
& X/ N  q1 n' d: K4 O0 I" ^% O6 O/ Q" k2 L% i
#ifndef qdoc
4 L. u5 w% @$ \5 E' ]( ~
2 a7 }, J  `1 p( K! J5 Enamespace QtConcurrent {' [! @& f- e& v

$ a5 W4 N" ]7 K) b& |/ U+ @template <typename T>& |. h6 L$ h) H. M0 f& I
struct SelectSpecialization/ \9 ^# X8 |3 i; Q5 ?
{4 Q. C! g$ L3 \# X( @7 @0 q
    template <class Normal, class Void>1 {5 g3 Z) F  [+ Q* L0 d
    struct Type { typedef Normal type; };( `2 a  j- R1 j+ O$ b9 z6 m. C
};
! x+ E& V' T% F' v/ Q% N! p. h: x5 z8 ~. n4 G) \: F
template <>, f2 D$ F  n1 W/ @4 H
struct SelectSpecialization<void>' T+ V4 ?, h; _2 C# o. C
{
& ]- C+ @- [3 C" l7 Z    template <class Normal, class Void>
6 ?" t$ ?* H% t! @% R    struct Type { typedef Void type; };% F) Z, O" j2 s9 N# v. c% p
};
6 N0 E0 \1 B1 I2 M" a
- M3 E* s3 a+ qtemplate <typename T>
4 P& d% v# ^" x9 _; M( {class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable9 k9 [! p, u" f
{
1 u6 C% Z4 G8 ?) P7 opublic:
. G" D8 k/ ~5 t5 ?/ z- ?2 C  d    QFuture<T> start()4 H# F8 u3 g; c& {
    {# J2 w, @* `6 H% E
        this->setRunnable(this);4 ~4 f4 T. O. f' h$ x' `
        this->reportStarted();0 d2 V5 m! r6 Z5 I# \- l
        QFuture<T> future = this->future();
% T5 N3 h6 j9 _" H3 [# M/ g        QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);- v+ W3 K0 F2 {. X. L6 I
        return future;5 W  b) j, s" L) i
    }
! |( ~  y# P; x9 O3 A5 B- G# Q$ A& }9 K
! V2 a  u5 [) U3 }( x, S    void run() {}
2 l6 N( c, v- J4 ]4 g, w2 ]) l    virtual void runFunctor() = 0;
! R# l- v) a' P: V};
6 P. I8 S4 {7 a+ F- q- v& Y
( R2 N' ~3 z% w& c( t0 Atemplate <typename T>+ Z$ j- t. A" V
class RunFunctionTask : public RunFunctionTaskBase<T>
. h" n( ?9 x0 Z, Z: T& a{. D+ i: F% Y& Z& G; d% U8 f3 y
public:
7 M  w/ L) G0 ^3 D+ k9 {/ i% b    void run()
3 s  k. I9 C  c& j' {    {5 h2 K1 z2 S1 d& k# _- z) I. g
        if (this->isCanceled()) {$ [8 e  Z3 B+ h! Y
            this->reportFinished();
) |! G- R2 U, Y' _  `0 ~$ j            return;
: B& ]4 X- j/ r) {7 q% u; l        }+ g: K$ X: o% _$ L6 J2 O# S* ?- `
        this->runFunctor();
8 ~9 x" V* H6 j7 ^  }) k, o: t        this->reportResult(result);
" y+ X; Q" W; o' Z        this->reportFinished();& c3 E3 b# P# Q8 |# g
    }
4 d" T! S: I' Q" s8 D    T result;3 M$ p- b4 B' P7 `
};
- O% Q3 Y( k9 P. C* p  ~# @6 v) k# B9 }! F- X2 Y# t+ M$ U
template <>
) r. T1 \3 ?. @6 L7 rclass RunFunctionTask<void> : public RunFunctionTaskBase<void>. J" Y* Z' Y2 R/ R
{
" {4 v6 X) ?# ^, p- o$ Zpublic:
' Y$ q4 K7 [  e. }    void run()9 G! T8 k9 r  Y3 M/ L
    {
6 U4 i8 Z% H5 i; f        if (this->isCanceled()) {" u, s  T! D. I- T
            this->reportFinished();
2 L! j3 y5 O  f2 b& w' D            return;
; Z& A+ B# v' s        }, j% w( n9 B# I2 f! J7 r
        this->runFunctor();3 I% M3 m) N; C. ^
        this->reportFinished();' N5 q$ q% s- Q* o
    }6 Y  w: C8 X0 Y( y% b& t  r, @
};& z$ `( w- V0 z6 @; U6 H

5 N0 I! s4 p4 W$ R5 Y} //namespace QtConcurrent
/ P5 [, i4 n7 o/ G4 b9 s
2 P+ [6 g8 }# N#endif //qdoc
9 y8 f) M9 W" r  y& z# ~2 V
$ y6 }" [3 _1 ]5 AQT_END_NAMESPACE  L2 J9 {6 _# H7 J
QT_END_HEADER! @5 j! `# E2 a! S2 _: `' a
0 l! ]! H6 _8 I' H* v  @
#endif // QT_NO_CONCURRENT
2 O) k! o/ g) c% i  l: E- u- h# s6 z% d" Z) y
#endif
' n( [5 p3 T: J
; Q+ d1 x( |+ {, u- n- V
作者: 2532609929    时间: 2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?  t- v( c* v2 q8 {& v7 N





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