嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
# v- F+ r8 s4 _+ ~% y3 H! O
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
; C8 g/ g0 `: O+ c
, C! M# C& e% K( f! v
这个头文件内容如下:
( s# A d5 l' \4 ]
#ifndef QTCONCURRENT_RUNBASE_H
: M& Z0 ~8 g- ?- R6 o
#define QTCONCURRENT_RUNBASE_H
O2 w$ k: E% o; l, w
1 U5 S a& H, ?/ j% y9 H( ^2 h9 e9 t0 p7 J
#include <QtCore/qglobal.h>
7 V$ G0 u6 Y2 u) S4 D+ |
2 a2 C4 R: w9 j- t3 h5 r* s
#ifndef QT_NO_CONCURRENT
" Q- Y- d5 M* B- u
; u) P1 B* N7 h1 ?% t! s# f; x
#include <QtCore/qfuture.h>
0 W ]( ?+ e9 E4 Q
#include <QtCore/qrunnable.h>
; I) d: I1 Z7 ?( [& u/ _
#include <QtCore/qthreadpool.h>
/ W6 D2 t% r: L7 K
( M2 p( x5 B. n+ F; d/ O
QT_BEGIN_HEADER
6 n9 Y& o0 C: H& g7 C
QT_BEGIN_NAMESPACE
" {1 P7 I4 K% F1 s+ I' W6 A8 z
* k2 e- a- o& M% n6 _; L& ^5 y
QT_MODULE(Core)
/ i8 u6 s1 c/ B2 H( Y! T
2 Y: X" s7 Q5 p$ h
#ifndef qdoc
6 p% X+ F5 F/ G; W }
3 m; n! v9 Y6 T3 V j9 Z
namespace QtConcurrent {
2 [9 j: G" P+ V8 k) L% M0 J
9 I' [! ?3 O% r: f( [* r& H
template <typename T>
1 d T! T# n; I" p8 k4 K
struct SelectSpecialization
, ^8 c$ T* e1 h. M: u2 _
{
$ v; l/ `& ~: q5 L
template <class Normal, class Void>
; w2 b% W' o/ g. f' r
struct Type { typedef Normal type; };
7 K7 _5 A$ n5 F
};
5 \4 D5 m e! x% t% q1 o! {
1 Z; [, W8 D" } K! N
template <>
; a- p7 Y4 R: ]
struct SelectSpecialization<void>
- m# N, \4 t5 n D6 n
{
' {0 @) w- ~1 [! X
template <class Normal, class Void>
( }& [% s, B4 \' L) [7 s$ [: e) ]4 i
struct Type { typedef Void type; };
3 g3 ]) u& t8 D$ K& r3 A5 |) o
};
! q* ^& ?+ a5 c& E: J6 O
4 \4 E7 }, }7 }$ V) H. d! J
template <typename T>
+ S; Y" N2 e! Q, _# f
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
5 I1 d( d ]+ |6 T
{
% B% }- l$ |1 Y3 a3 [
public:
! U/ t. Q) A% w: J9 _3 }6 c
QFuture<T> start()
& U4 R6 E; ]+ u/ Z% y: U; e8 P- g
{
% V+ t5 k9 y: k1 O$ C0 a
this->setRunnable(this);
# ?: ]1 C5 \( V# p8 L- K
this->reportStarted();
' \$ Y* U) |( j7 l! s- J" w
QFuture<T> future = this->future();
2 J- D) }0 @ U! q
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
2 A( r5 j I+ Q, A
return future;
8 N) M3 [1 r# x! E2 O4 [
}
! I, V% w7 r4 q" O" c
, {$ p, d3 T& d4 n/ s! q* @# p
void run() {}
. V0 y, E5 V6 |% s; k, {3 R3 c. x
virtual void runFunctor() = 0;
$ M* Z! |( l0 e/ A
};
" P3 z9 J3 M% u& ]
7 B5 d; L& w; V+ K4 V1 Z7 [* x
template <typename T>
/ N3 G. K7 g+ v) r) \$ F! ^% f# X
class RunFunctionTask : public RunFunctionTaskBase<T>
4 W; t/ P& A5 ^1 P! r& i9 I
{
3 L0 r3 L5 l& W2 |' u2 l
public:
% i# j3 {- k7 s
void run()
+ R5 b: u b% f' h4 D+ u
{
. f/ y# E9 r/ o, {
if (this->isCanceled()) {
: ?- G' G2 f& r- f- g* S
this->reportFinished();
' T& @1 ]0 v( m6 P- B
return;
8 t! C8 Y" `& W- g9 u9 N4 v
}
+ _8 w1 @( b: D7 L, Z
this->runFunctor();
+ H& o ]2 W% @) `# \( p* n: \
this->reportResult(result);
/ B* r! P/ e+ {- K" ~6 T! u
this->reportFinished();
3 d+ {( F$ K0 W' x
}
1 v& h. Y& U+ x9 M2 g" K
T result;
- `, ]& ]- j/ O2 g" P; A
};
7 `) B/ J! Y1 ^% d( I/ T1 y0 i
' i" {" ^3 M+ K/ e) ?2 l
template <>
$ _2 E- ?! ~- B) k
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
& u5 N! E4 J% [
{
9 w& n- K' @0 w6 i! S9 x3 E: B9 p
public:
) l: a! B. V5 e9 M! K& ^! B% a
void run()
( @7 r( V% @4 o: }1 c* Z% m% e% M
{
$ t4 X2 i. {2 m1 a9 j% V8 B
if (this->isCanceled()) {
2 t5 A$ m, l4 q3 e: E* I
this->reportFinished();
% F* x- s" Z$ R
return;
1 H: w# j3 o: U) y a
}
6 i1 e7 c* I5 J, [" z6 A* Q4 |% j
this->runFunctor();
7 j) v) a& j+ B( M0 P' X, g4 J
this->reportFinished();
X& b5 y( }2 a4 R2 N( s6 i3 e
}
2 K3 s7 {) S- S- |( l, ?6 K- h
};
) m& z1 C( J; M' y7 ]$ ?) J" | R: O
+ F+ s+ A/ T0 l7 @1 e7 b! n
} //namespace QtConcurrent
. {0 q7 Y! D4 Z3 \# R
) D) a7 \: c- d
#endif //qdoc
8 X) ], U' ]$ z: i2 L
2 V! o0 K1 H- p+ r" ^6 a
QT_END_NAMESPACE
, \( C2 n( d) e/ j8 s: h
QT_END_HEADER
% l6 O3 Z) B4 }- x
% b8 _& W5 }' Q: V! F" c* E
#endif // QT_NO_CONCURRENT
+ v' g+ g) L5 S3 `, u1 Q. \
8 T5 X8 j; D0 E6 _( |7 c
#endif
3 c+ X. i$ R2 |/ _) G% c- s& w
, k" j- e: m" D4 Y
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
; L7 m. R- y+ x1 |: N N! R5 x
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4