嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
R1 p1 l$ ^2 t9 H/ {' z
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
9 E' T6 E+ F$ G
, L! K' y* k4 G% u- I4 Q5 Y0 c9 J
这个头文件内容如下:
& k- s5 w4 y0 t. t4 D8 B
#ifndef QTCONCURRENT_RUNBASE_H
% l% B; f# G* F/ A9 @
#define QTCONCURRENT_RUNBASE_H
) z2 X- A7 z# X6 k- a
, o+ L3 s2 s X6 [ d* h) L( A
#include <QtCore/qglobal.h>
! q$ s! G. M, J5 G* {
4 U7 [1 {! x7 F- Q9 U5 z
#ifndef QT_NO_CONCURRENT
+ _: y& a) A; y" B
8 T& U8 }* B( p5 j
#include <QtCore/qfuture.h>
7 ?: L+ J6 S# g3 ]) p3 R
#include <QtCore/qrunnable.h>
0 {2 w! I; p& }! ~
#include <QtCore/qthreadpool.h>
/ I1 O; \9 ]2 ]+ T1 a2 k3 j
0 g$ s3 q8 p2 }% x# U) R
QT_BEGIN_HEADER
: m5 E3 F1 B6 X: B' d7 r2 _
QT_BEGIN_NAMESPACE
% O" I- R0 j+ Y+ v5 R
" u8 z! ~/ i- @/ J# a
QT_MODULE(Core)
. V- H7 C2 u( X9 C1 [) P
9 f1 ]* D+ C6 _) ^9 e: G2 x( _
#ifndef qdoc
: E% P! o( k" W8 m" X
4 K$ Y7 x) g6 e3 H- ?
namespace QtConcurrent {
0 @) m4 u$ E/ o) {$ [) Z$ X. s* u# T
7 x' X8 M9 c" Q$ J) s; G( z! [( T
template <typename T>
" x1 T: R' E, I% i1 @ x- }5 Y G
struct SelectSpecialization
; t, n1 B, t0 Y4 {* F3 x
{
( \: T. \" L3 o
template <class Normal, class Void>
7 L* O: Y F. S9 j& P
struct Type { typedef Normal type; };
2 l/ [4 |( L* ?: _
};
" V2 z+ u% G& ~7 S
0 J) Z' {1 R/ R6 O/ | \: C4 d
template <>
! h, e" p; y7 f m9 e3 G' B
struct SelectSpecialization<void>
% t9 d8 @4 K8 T; h" \9 B- l- K0 f
{
7 `% [) m' k. N7 g' v6 |1 K
template <class Normal, class Void>
1 ]7 L# Z, }+ `" K9 A5 V
struct Type { typedef Void type; };
0 a6 N. n6 ~+ B# K+ n$ K
};
2 A2 g4 d/ Z6 z" ]$ e6 P' N* Z3 }
# g& D4 c; t+ V7 }
template <typename T>
: f, _6 k% g: c, b
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
! x$ A) }1 i: u# }1 @2 K0 o9 ]
{
. k* o) x3 d) h7 `2 i: l0 I7 u
public:
7 D# K8 T3 g* |/ i% D
QFuture<T> start()
! {/ K% U; _ ?% t9 d$ p
{
6 w2 n' y: L" `/ Z
this->setRunnable(this);
- u) v" n6 q' b% j$ c
this->reportStarted();
+ [( p0 @) |# b: }( x
QFuture<T> future = this->future();
; q7 k$ P& E0 W/ l- ?- h6 \/ _3 P$ b
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
& d4 Z0 a, A( Z& q: F/ e1 v% D6 k
return future;
3 u" f) J$ @1 \; K3 z' @* D7 T7 u
}
2 `% V# x% i- r* j: e) C3 i8 O
- d' ?2 l+ `! P' N
void run() {}
9 R! g1 X1 B% g2 n8 s+ L8 A5 T: M8 Y
virtual void runFunctor() = 0;
) M8 m' t* a" V& _: H0 Y( F4 T5 k9 p
};
7 S( F z( E& z0 e) L
# @: j4 r1 {$ \) j0 [# A1 z8 \
template <typename T>
H+ e8 a% b0 X9 u5 R9 e
class RunFunctionTask : public RunFunctionTaskBase<T>
9 S: D6 a s5 M- r$ v
{
2 E; [4 o! o* `2 [4 s5 K
public:
: j8 C# c5 X+ G# x6 @( l! K+ \3 X
void run()
+ V: h1 M/ {, L( y R
{
8 ^3 `1 ?3 H7 w ?% m7 v' ?
if (this->isCanceled()) {
2 \: W- J! Z5 T0 g6 Z+ n$ @% c
this->reportFinished();
: {$ `" T% d9 R5 L) S9 v2 d
return;
- D1 j8 R* b; e. S7 y1 u( {% b( d
}
' k: e/ ?4 w- p$ ^2 F* g
this->runFunctor();
& q" f0 |$ i. K D; } o
this->reportResult(result);
+ R% t1 V' w3 a
this->reportFinished();
% P1 a, c! D& Y
}
. J m: G% g* }8 b
T result;
. d; E; F$ y3 Z$ o6 p: H
};
7 }! p* t+ N" b& \# j p
$ Q8 j. A' f- p0 w" b, d3 t
template <>
) a) @8 N! A" }: u( H8 _ N4 N
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
& |2 q( u6 Z; y; k+ c" O" y
{
3 w" L% N& R" }* A b, G
public:
' D( T* ]9 q5 T9 R7 [2 p# m3 g
void run()
$ u! J- z' N9 s. C. R% s
{
V+ M4 m X/ F- A5 t& S! I
if (this->isCanceled()) {
7 n1 @7 Q' i0 g5 h' \ x
this->reportFinished();
, R# ^ g8 K1 `2 u7 j4 S$ T1 W
return;
0 C+ p! H* q: `: s9 O
}
8 ]) u3 P2 t1 s
this->runFunctor();
( d3 P$ {& { J) K" U s# @ Y; u$ V
this->reportFinished();
" G' C0 o1 Q) w* b% L A6 p
}
& j7 ?+ Y" T& x0 \2 u
};
$ ?9 x. _4 G2 V; V8 _
+ Z) L2 I' e t3 A! J% ~
} //namespace QtConcurrent
0 g5 u q3 i# D8 c# b$ V3 Y
1 t# j; ^- o, |3 T ^0 _" B* H% C
#endif //qdoc
- L6 [: W& \* c7 g
: M @6 {& S& r9 V
QT_END_NAMESPACE
- T8 }( y+ D/ |7 J; L! L/ I& l9 V$ K
QT_END_HEADER
7 J0 q% s0 x1 U7 s4 \5 R" e! w* i
2 i- Y# K3 M7 w. _! S
#endif // QT_NO_CONCURRENT
. j& o* R/ d+ Q0 F; v
# Q0 ?$ Z( E- V9 N9 V
#endif
( m7 |3 g: v) g) N
7 W& M: _! c% o" E
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
/ R; a3 o8 i/ e, N9 @3 {3 j) |" t% Y
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4