嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
- _" o( _- `# b- 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'
. R5 W% C( y e
" M6 Y# y+ J3 M+ d' R
这个头文件内容如下:
) v# t) P: B4 A1 C
#ifndef QTCONCURRENT_RUNBASE_H
* y* n* i0 z* L
#define QTCONCURRENT_RUNBASE_H
- L5 s3 l* v O- R7 @$ w
[1 W6 W. y9 C! ?4 h* l
#include <QtCore/qglobal.h>
+ A& ^/ X. O/ [7 K( O2 u
! m- T$ O3 t( x
#ifndef QT_NO_CONCURRENT
2 A, _$ M) T( P8 U
p$ A) n7 L; J& w
#include <QtCore/qfuture.h>
- W* P6 E3 P4 V' [$ i) w% I, {3 M
#include <QtCore/qrunnable.h>
3 n4 Q5 v0 _) V, }9 A2 _
#include <QtCore/qthreadpool.h>
7 W9 g. l G4 X' e/ P6 a0 b2 x3 ?
( n2 u% _* B6 B! G
QT_BEGIN_HEADER
2 D( h8 }+ c- d# O! f* r& f' [7 l3 t
QT_BEGIN_NAMESPACE
! D1 `2 l8 ?* {7 I6 r
& a5 k0 l Z, S
QT_MODULE(Core)
' O6 n8 L# r4 W" ^" M# S
+ N: X* K. _5 y2 ~ [ m( [+ x
#ifndef qdoc
: Z. v$ e% e! {2 p) q- T
) Q/ _; J& H' k5 ~; F# m+ M
namespace QtConcurrent {
6 L1 M7 r4 I8 |9 V# W0 A: r6 L% p* W
/ H; v8 V, z. }" P0 o& Q/ g
template <typename T>
) X# k! ~6 R' S+ h& g T
struct SelectSpecialization
" ~5 U( [' O* i& ]$ M9 |$ ?8 R7 L
{
$ f2 p+ E! _; n; C( g4 M
template <class Normal, class Void>
% n4 H2 w& H" @- s; ~9 C8 _4 R
struct Type { typedef Normal type; };
0 |/ [, [; m( W+ q" U2 i6 }
};
0 \, ?# p; {8 R/ _) O1 K2 d- O
O( f9 S# S; ]( w0 h
template <>
4 K6 O( M3 e" z L* k$ a6 z) b! u
struct SelectSpecialization<void>
* c& I5 U0 Q4 G0 v* b$ s
{
7 ?4 g" k/ c, t# @
template <class Normal, class Void>
+ l+ x6 P; H/ O% {
struct Type { typedef Void type; };
0 B5 r' T; _/ N1 L
};
' m; N7 `( d' e6 E1 c
. F1 w7 w+ L) O& T4 ~6 M
template <typename T>
) i7 ~6 k+ b* b" o3 ?
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
1 g, l# D2 t4 R- ~! O5 t
{
/ k# `7 b8 p9 x# X
public:
# k8 u% \( s! [8 q
QFuture<T> start()
7 `! o. y, c9 z+ ?" `2 f8 I; b( M
{
$ q; J% @* W$ ~5 n& O$ A
this->setRunnable(this);
! X# ~: ^" R R
this->reportStarted();
: q. ^6 s+ [5 ]0 a8 c8 s
QFuture<T> future = this->future();
, x$ g( A% }; l) p
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
0 O2 T4 L0 Y, g* Q$ A
return future;
! t; S# c2 M, c5 ~8 h& j
}
7 U2 f8 H- N0 N$ m/ N
* k7 d+ N, z4 k8 V" h+ k
void run() {}
; W3 h/ r: ^# K
virtual void runFunctor() = 0;
+ m3 q; F0 C6 I& T# {7 X
};
3 [( o1 L4 @( i/ k+ G
% v, P! Y* [- P( c% F: r7 i
template <typename T>
/ P/ q l+ H: V2 g
class RunFunctionTask : public RunFunctionTaskBase<T>
: U+ I2 v% G* Q3 m; b) }9 I$ }
{
0 Z+ f0 G6 T# K% |3 U; j& j7 l7 H
public:
( P* D% S! A$ u F& x1 B: N5 m
void run()
+ B* ?' X# D, n- K
{
; p6 o) `; S: m& n p( M5 W* Z# w( ~
if (this->isCanceled()) {
: y* b. Q1 P( m# @( X! k
this->reportFinished();
6 P7 g; p$ g0 r1 T
return;
0 \1 w$ S, J" h7 c9 _ \ w
}
/ `9 V1 {1 N, n, m* w3 b! B, f* M
this->runFunctor();
( o5 b+ S3 S# O% y4 _, C
this->reportResult(result);
' i4 D( y: g/ o) ^( R" L, }+ Q. ]
this->reportFinished();
! F9 g+ l! _0 C, m0 D
}
* v& ~* B8 D) e. d3 @3 a
T result;
: m# j: v1 ~0 M" e3 k
};
7 `8 ]& V3 G! A# J& K
: I. |% X! H/ o
template <>
" g/ c! X( S- f% L: q8 f/ g
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
! `6 `# N: A% ^6 d1 x
{
& o# {8 B; }8 P6 t. j
public:
4 Y2 ]" @$ [! H( ]& j
void run()
+ e' W9 |) O$ ~4 K" i# r: U
{
& ?% ]4 f0 e: q; q* I- T% {
if (this->isCanceled()) {
7 i; t: y0 {( c4 ^7 {
this->reportFinished();
8 q/ t' J/ R, f4 u1 E
return;
( h; d6 ?, q* {; @: g, c9 s
}
6 K5 R' A9 f" B1 a
this->runFunctor();
# _. @# |# m( t# S. g4 `
this->reportFinished();
+ h+ s6 O) }4 E! X2 L7 H
}
* n& M+ P1 i g- o/ T, C
};
% a/ R4 Q4 z, u
5 H) c1 l! n/ r/ e \
} //namespace QtConcurrent
/ X$ F5 u8 R+ |! I: y: B
" X$ o+ f( F, w' ?% _
#endif //qdoc
& V$ ]9 f6 H, B* C4 l3 x/ [" ?
0 _: A4 y/ l: _1 }
QT_END_NAMESPACE
% `7 h: q" g) K
QT_END_HEADER
, S: ?$ }9 e! i' N# o B
0 _4 Y1 s5 g0 c" ] s7 p
#endif // QT_NO_CONCURRENT
/ S( ^9 \: [. k) ^
# q' K! ?4 S, n5 |7 z/ ]6 J) c
#endif
$ v6 S/ x. {) r' b
1 H! Y* R; r/ x3 A0 P
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
. U& q5 S7 Z: ~# o# J# N) g
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4