嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
0 R" Z: L" h) W% F5 @& N1 y2 Y) L
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
0 d% z: ]8 r/ ?7 c. M- N
# k& x, p) e+ R2 e' C
这个头文件内容如下:
( w6 Q7 k0 o5 b( d/ {/ l! J, c, m
#ifndef QTCONCURRENT_RUNBASE_H
2 k, K/ T, Z4 q; S' x- {8 m
#define QTCONCURRENT_RUNBASE_H
- I: h6 z* V, ]' F
2 i$ e. J- ^( b6 A) W/ a: K$ r
#include <QtCore/qglobal.h>
1 d$ ~, P: j/ T# O& `
' N) P% a1 C4 h( K
#ifndef QT_NO_CONCURRENT
, s1 O, c; r. `7 ] \/ x
7 W) e2 a: ~4 [' d0 }# Y
#include <QtCore/qfuture.h>
g- Y4 T0 _4 o3 A7 \5 H
#include <QtCore/qrunnable.h>
- M- s( G. @) v9 \. y
#include <QtCore/qthreadpool.h>
* c( o: z; a3 `$ L9 V$ M3 c( Y6 i
2 m1 D b; H8 L* [* g( }5 \
QT_BEGIN_HEADER
! f- n& }3 [5 X
QT_BEGIN_NAMESPACE
4 o A; d" i: @
. ?. y. z& i2 t$ v/ O" s1 k+ {
QT_MODULE(Core)
) c) n3 B* j* \3 r5 W+ o8 J3 m
% m/ g& s, G7 g6 ~
#ifndef qdoc
" c/ h- @ q. c
V# S0 [0 u5 B) _0 _
namespace QtConcurrent {
: q& }! r0 S, A6 l" {" _1 ]! b
6 i4 k/ w6 D+ \) w& d. r
template <typename T>
5 z8 O! Y. B6 x7 o# `% e& ^
struct SelectSpecialization
1 `% u; {6 D' i$ _ c
{
* R: M4 Q" v! {/ U$ n) @0 ~
template <class Normal, class Void>
7 |$ q+ {9 w( r6 {) Y
struct Type { typedef Normal type; };
' p: n9 n, H1 w" p
};
1 }* I! }0 d! _: K0 W
2 C6 {; d, X! ]6 ~+ |) i6 X
template <>
$ R, S5 M/ t1 b, R1 W e
struct SelectSpecialization<void>
2 ~7 g7 L% }/ \6 ^
{
1 O% U! \% c2 ]5 T
template <class Normal, class Void>
+ z: |. [2 Q( }8 J& G
struct Type { typedef Void type; };
8 b# A5 K% r8 B- q4 ?5 a
};
* u0 X* r# O6 j
* e7 p8 g) L1 H1 A
template <typename T>
0 ?9 g* x0 f& ~) C5 m5 w1 m
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
p4 V' g6 r$ p4 S1 m3 w5 O
{
4 n6 X% Z+ Q+ s# P$ K, Z: _
public:
$ _9 z9 ?& \+ S# g' }# o" u$ H
QFuture<T> start()
# ]; I) c3 e# ~' o b" H
{
; [# R" B9 L" o
this->setRunnable(this);
5 H3 A* g6 d6 z7 y
this->reportStarted();
' y: p2 k8 {3 n
QFuture<T> future = this->future();
# e. g$ h7 R% V- E7 z
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
( o' \$ a& D9 \
return future;
3 L, m1 Q. h% d
}
! [+ G! w: Z1 Y5 a7 s: ?
; ?- C7 v! F! q' w
void run() {}
( y2 T4 V* U" h5 j
virtual void runFunctor() = 0;
; j# [9 i( v- H. b5 c& `
};
, ^; \# Y" a0 N" }
- q% o- t% M8 L3 a
template <typename T>
% T$ q# Y; ~" U1 Q
class RunFunctionTask : public RunFunctionTaskBase<T>
3 x4 b! d% Z/ |3 K
{
! @! x# |( N$ u# V
public:
/ D* o( Z0 Z! l' G/ ~
void run()
* p) N$ d: M9 x x
{
3 p+ C) C, _. Y- L
if (this->isCanceled()) {
# F/ q1 _7 `& o( _/ l0 w
this->reportFinished();
. {/ f5 R9 v$ {$ z. [
return;
/ i1 o1 Q0 _; Y# ]/ \7 J/ A0 D! [
}
) z5 b' Z' E+ T+ P" L8 a
this->runFunctor();
/ k1 y8 z9 N* Z! N+ s2 J
this->reportResult(result);
# z! |& j& L, t! [3 W: O& x
this->reportFinished();
: `+ U, f: i. ]/ c4 P6 W$ z
}
( [4 Y2 x# K6 _
T result;
8 q! T D9 J9 Q8 `1 C" o1 R( a
};
3 n+ u: R2 L) H% Y3 j1 ]! `5 b, f
: J L' g. ?/ C
template <>
- o* o" M) c$ n0 f+ K: v% e
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
+ @" D2 F3 E9 d! f9 Y& p; L- A) z
{
! [6 g1 }7 x+ m* R) S
public:
8 E: V* [) n* `
void run()
7 F( ?7 i) F1 E9 F& U
{
% o+ z# W0 x7 b0 _
if (this->isCanceled()) {
0 |( O' l5 Z" @4 l$ I8 D
this->reportFinished();
& R5 x) m ]0 t W% \ V; y. L/ ~/ t! h
return;
1 |5 Y. ?/ s6 @0 H8 A
}
, U3 L0 M- J0 t& B4 ~& \
this->runFunctor();
4 i5 e8 F3 n& n$ L$ P' y% w
this->reportFinished();
! h' y+ ~9 [4 q
}
3 p/ O+ r; e$ D0 e
};
$ ^% N8 e6 Z' P8 z6 \
4 B F$ D. |" f# l
} //namespace QtConcurrent
0 E: r3 R/ Y1 ]4 [% U" ]$ ~
( m2 |/ e- J: O# k
#endif //qdoc
, h. E7 y- A x* s5 l0 Y$ H
# C5 w% Q* S4 k R# q3 S/ Z" y
QT_END_NAMESPACE
" l7 V. f* p& R0 E7 q
QT_END_HEADER
# N( S( h: Z4 ]6 `# x9 r- h
4 v: V2 c9 s) x1 X
#endif // QT_NO_CONCURRENT
& k1 y& {/ B+ _. N9 J
4 M: p" B0 _7 J; b
#endif
5 {/ L6 U+ B- J3 @, @* L m. N1 P
8 {! B9 O3 g) v$ k
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
8 }) U& H2 [6 l
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4