嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
( Q* c0 F: T% L4 L& }# l, j
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
7 p* k9 a" C& n8 ~- X
, p5 D; V H3 Z4 g/ o- `. W
这个头文件内容如下:
( X9 L; Z$ M8 m( ?$ j
#ifndef QTCONCURRENT_RUNBASE_H
3 N( |: |1 E: D3 ?0 Y
#define QTCONCURRENT_RUNBASE_H
2 q i$ o, o2 j& j
6 O/ `& ]! B, _6 x9 V" r5 P
#include <QtCore/qglobal.h>
/ U' q: B0 p! T; ^' b+ w! n
4 G: E6 N: S% F& i7 `" j
#ifndef QT_NO_CONCURRENT
+ `! `( [8 l3 Z; j( f
: x. `4 f2 M- w1 _
#include <QtCore/qfuture.h>
, \0 ?) _+ A7 q, d: F3 X7 e
#include <QtCore/qrunnable.h>
+ b- b/ z7 H( `9 S- l( o
#include <QtCore/qthreadpool.h>
7 a7 }( Q$ O8 P; K: M: U
+ h' V% }! E- a& F
QT_BEGIN_HEADER
: W- ?: y# o% I! @' ~8 {6 }, Q
QT_BEGIN_NAMESPACE
% Y3 h: \" _3 d& K, C- h9 Z
: G7 O5 q4 y2 Q1 U Y: O
QT_MODULE(Core)
e5 ]; Y1 {: I0 f; x% `
' m& c8 F0 }% |- ]# x
#ifndef qdoc
- J5 V" p. u3 ]7 g: z' Z
( y& _( F# F& w! {! s" }
namespace QtConcurrent {
# E3 \, J+ Y( ?( S
6 R3 f7 l* j5 c; c4 y9 |
template <typename T>
7 ]& I% M7 P; K3 j% ?
struct SelectSpecialization
% S, {0 \9 o% b- D$ ~4 I% [
{
7 x) t' ~4 @/ r; S" H( l
template <class Normal, class Void>
?2 M0 q7 e3 {) f& x7 g
struct Type { typedef Normal type; };
( |- G# ]: J, x; W
};
2 U& t$ N2 Z# L- o& G# T* P
3 ^; Q" `# d- s
template <>
1 Z9 P7 e3 r8 T+ P- S
struct SelectSpecialization<void>
0 S. S( i- E8 m/ ]1 ^) i
{
3 c! o8 k$ {, a, T4 M
template <class Normal, class Void>
1 P3 s# A* ]+ T8 `: d
struct Type { typedef Void type; };
& L: @; a7 M' B7 u& z. ^
};
Z$ ^! k5 ~9 ]* }0 V
1 c. X! S7 o' b- k( X( x
template <typename T>
3 z1 t" W O6 u9 J( `$ L& ], n* Q
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
7 V7 ?6 B. c6 ~+ j F
{
- Q9 B1 A* c2 w% N' b& F
public:
7 s5 W* L/ G- D; d3 ]
QFuture<T> start()
1 c8 Z. U6 D4 u: ]; H
{
, I! T( x+ j/ D& o
this->setRunnable(this);
4 t- f* f( D% v, Y
this->reportStarted();
8 d4 }2 z# l) V/ U7 v" d( h2 d
QFuture<T> future = this->future();
j9 G3 @. m+ W$ S
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
" Y( |6 g$ _, X5 s; z; B
return future;
% C( X/ n' V& Q! a
}
. \1 k0 l. q+ h& u; _7 M9 v
! b/ j7 s5 W7 p o) v$ [; \1 G
void run() {}
% N! |9 K3 u7 j9 Q0 u2 V. Z
virtual void runFunctor() = 0;
( O' `+ U4 @" O, i2 c
};
4 z! T- I' F! A3 m u
3 ]' z) Y, E l1 X) l: J% y
template <typename T>
& m' o7 ]) m! w1 }/ y
class RunFunctionTask : public RunFunctionTaskBase<T>
) g! z& D) B; V- a
{
6 I5 v$ C$ r/ J4 l# ]" x
public:
& f" e$ } t( N! D3 R4 M
void run()
: S$ f' V0 d9 G" T5 {+ |
{
, J' r" d2 V7 K: \; {
if (this->isCanceled()) {
8 e( r/ y3 {' `$ E4 {' O
this->reportFinished();
) l% Z) S' h, Q5 }2 C
return;
/ L# Y, j) D( f4 C
}
% f5 I, U2 r; j% ?5 E6 ^
this->runFunctor();
1 d8 H; |& e3 a# @: z
this->reportResult(result);
6 N# g5 W. j7 t9 a3 C" ^
this->reportFinished();
g- _! x- a- p- Y: D+ u
}
7 @; p5 V. e4 |0 M5 i
T result;
- z5 ? m: ]! e' y. N
};
# q$ @8 v; q: M7 g
! e. \# D$ Z9 o8 Z
template <>
' n2 \$ c4 j$ g( P4 w; r
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
9 A# {' _( g, K; P
{
# T# P: W1 r" A+ W7 `: g: T/ N: Q! x
public:
6 @' m; S7 O1 D( R5 d, N3 V0 @
void run()
, {5 W5 \( M9 z% c" ~5 I/ w
{
2 s8 {- _9 v' }# ^( f! X
if (this->isCanceled()) {
9 u5 X/ j$ D+ y) k4 q
this->reportFinished();
$ G0 z3 Q3 N5 p0 K/ U
return;
! v. V* t$ c& f. o
}
. p3 }9 z8 }* {0 n) N$ d
this->runFunctor();
+ T- [3 i' m" B8 v; Q$ _
this->reportFinished();
0 Y! M3 c& h) a6 S
}
2 j% a- s& [ ] q g
};
/ e. ^" J1 ]" G1 W; v% @& W
+ S( X/ r- i( m0 x& S% ?# Z
} //namespace QtConcurrent
; p3 T* c4 f+ O" L2 |, g9 c3 v
$ ~) W& ~ P4 G0 H. l8 L9 z
#endif //qdoc
! b, ]4 @# e9 a; R9 Z3 G5 e
7 x4 c" M& d. i- j2 Q, w! w% s
QT_END_NAMESPACE
( C9 F) d' ?- _3 R
QT_END_HEADER
. A2 `/ l/ T/ U8 V
: ^. a* F l/ Q
#endif // QT_NO_CONCURRENT
, o7 G# O! ~2 _
, B9 |3 g" ^8 }/ `2 a' j1 l
#endif
" D/ n/ U. ~9 U. y, E$ j3 `
1 O2 t. G3 _5 w! t
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
4 q" p, s( L+ `4 L! n
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4