嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
& C5 |7 S& X9 a, {+ w. d
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
# B' ~4 [# ]* V4 ?$ d, P
& z6 E5 o7 l! z
这个头文件内容如下:
! G; {, B; c2 t8 r7 n% Q- |
#ifndef QTCONCURRENT_RUNBASE_H
4 w5 {; U B Q+ @2 z& p l# }
#define QTCONCURRENT_RUNBASE_H
% r( U0 ^3 U& q) U$ i4 M# m* A, S1 Z
9 u' U& D5 b% t& a" O
#include <QtCore/qglobal.h>
/ t8 S- B1 b, I/ t
5 |' g' V. D; [+ t/ L
#ifndef QT_NO_CONCURRENT
" {9 ]4 h3 \. m- ?" \& y6 c
; c) `* ?/ V, M2 V* `% V. c& P
#include <QtCore/qfuture.h>
9 [; |# J' D2 y
#include <QtCore/qrunnable.h>
. j- o$ I% N( \: o2 _
#include <QtCore/qthreadpool.h>
7 F7 u3 J% J( L/ e; M4 Z/ D, @) a
5 d2 j; c( l0 Q; w
QT_BEGIN_HEADER
2 E6 I) S+ B: o) h! H8 d7 i
QT_BEGIN_NAMESPACE
) `. O$ S1 X/ l. C, k, Z `. x
* r) j5 `# ?* n
QT_MODULE(Core)
- D, l5 W- x- I. K8 N. z
+ U; Z) {$ M F/ i7 @
#ifndef qdoc
K9 L7 {% Z( p3 [
# ^$ z' i: q% D; M, R
namespace QtConcurrent {
3 y( t/ a! T8 L; d
3 J/ \$ c5 V. @5 L5 i7 s
template <typename T>
6 y0 P( T: c/ _- W
struct SelectSpecialization
% L/ j/ y! B2 b9 M0 C1 U6 q
{
1 o1 e; T1 b- M+ k( U& l
template <class Normal, class Void>
; W% F) z1 G5 c( z2 ]2 E# C; l) q7 b
struct Type { typedef Normal type; };
, N. B% v. ]- H' C- O5 d* F" D0 b9 e
};
) g# k/ j1 w: w2 Z5 f; v9 K
% x6 H0 D$ S" t% `$ N$ w2 u+ s l# s
template <>
o# K. L8 d% k7 U. |
struct SelectSpecialization<void>
+ F" O5 u) i; c2 E4 G/ k7 R
{
( |: y& G* n( U1 U' S: ?( y) f" \
template <class Normal, class Void>
3 [ G: v% e# C7 S" m R6 K
struct Type { typedef Void type; };
, l* Y8 m3 j8 s$ v2 T
};
, u: d% s5 A4 u- @& _$ N! s+ O
4 ?( k: n2 R$ H4 ^; e% {/ M0 w
template <typename T>
7 Y" z. }9 z5 j" d* I1 b
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
- R0 T h: \6 q! Y3 t, R- Q- F$ ^. A1 w
{
) v. c$ G* t8 {2 e0 B
public:
' K! J8 F3 f& d
QFuture<T> start()
) J0 j" C3 k& }2 T
{
/ ]1 M* [7 t" M8 V& @, Q _
this->setRunnable(this);
& }6 S- l* |+ l
this->reportStarted();
9 P/ i, I" h+ ]7 q7 F2 L
QFuture<T> future = this->future();
$ j" m( |+ @! E8 y( Q+ p
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
, Z9 l" V9 r( @: {6 R. M4 n
return future;
5 f' D% |+ V2 X# K4 p. m
}
& d/ q7 R% S( O
" s& I4 \. V+ q" r
void run() {}
. `% U! b' Y. |
virtual void runFunctor() = 0;
+ F6 T) y* Y' D
};
' q; g+ y# {8 w) k
) n4 x7 `/ {- z+ I- X1 K+ B$ |# Z/ q
template <typename T>
& `# R$ U3 e C; Y" H' M3 x; b
class RunFunctionTask : public RunFunctionTaskBase<T>
5 a* L2 o- n1 L: a- z! {2 y \4 r
{
" w+ Q. ^! F/ g% {
public:
! s9 ~5 I) S+ {, N
void run()
. o" X& ]! A4 }4 }1 A6 G) y
{
( C) l9 k2 Y0 [3 W: F: S p' ?7 B5 m
if (this->isCanceled()) {
6 F( J, X& Z" j. R) m- K0 c0 ~
this->reportFinished();
" C* `# P( {9 G
return;
# B, t) Q* D' e3 E$ Q
}
' N% |# G% J d4 l6 W9 c+ U: p' H
this->runFunctor();
) C7 A" A7 q( Y- G: J2 b
this->reportResult(result);
9 o: W: Z% P# \ p3 m U
this->reportFinished();
3 @* v: @: P0 y1 a- D3 J. f5 N
}
h/ H6 q1 r! `) ]/ M$ W
T result;
1 X/ n# n6 M. j. u' R
};
2 o& t' v4 n* Y( c! V. f# u
' _2 d( o( m8 p% H! K; P' g
template <>
/ \6 R8 e4 m( t, ]/ h! ^
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
" q+ ]* M6 u4 n2 _! p5 Z
{
1 p: g9 x1 D1 q& U- l# O7 r
public:
) s9 o3 T d8 r" t0 K/ F7 b
void run()
: H; }% U$ g% Z! S( Z, j9 g% @
{
/ G7 f% B! B. E) D. F
if (this->isCanceled()) {
5 b4 X5 r: E" C
this->reportFinished();
) A& ~- K" n9 r X8 q
return;
: Z, p! ]+ C/ J4 A/ X
}
, E$ v! W, S" y6 H* l0 D) n R' A- d
this->runFunctor();
/ S5 I A! F* q+ X
this->reportFinished();
$ e" F9 \4 n4 c( y3 O1 n8 U/ y
}
* X6 i& r- s+ I
};
6 a: E. O" m% H$ z; ?# ?* R7 s
2 z7 f6 m- ]. B% `
} //namespace QtConcurrent
) G0 S( d5 G2 `" b. o
: `1 G' H/ p4 Z+ v: y
#endif //qdoc
7 _' E) d5 |( D$ f- w6 ]
, @+ d. f9 [( i" @3 E% E9 f0 ]7 E
QT_END_NAMESPACE
" U* Z S$ s. ]. b; K5 l, a
QT_END_HEADER
$ [+ x" U" {; g# F U! \$ j; G' }
7 f4 D1 f: J* Y4 `
#endif // QT_NO_CONCURRENT
2 G4 k' b1 z5 O8 y) d" U5 ^
) e7 S) Z7 M) ^$ Y- I
#endif
0 B1 m% g; K4 G. i0 u$ R
) ?% }, S7 F1 X j' B/ `9 |" } Z) l
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
/ E* S, C- f' f
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4