嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
8 S/ b. u5 |; W( w* X0 }8 A
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
5 j7 ]( t7 u7 u% _0 I4 R
% Z3 B% _. v' ]( O5 W
这个头文件内容如下:
+ o2 R" M* e; q% v' k
#ifndef QTCONCURRENT_RUNBASE_H
2 x! o% \. ~! T9 P" Y/ I7 T
#define QTCONCURRENT_RUNBASE_H
1 I' a. x, n4 i& H
9 C6 ]! Y* U$ u. N' j7 r! E
#include <QtCore/qglobal.h>
: R" x% J$ ~, B8 P
1 _$ `6 \: I3 q7 b- F5 B
#ifndef QT_NO_CONCURRENT
# |! G% n& L" h3 u! X7 o
% F( K2 h3 y# A- {( ~
#include <QtCore/qfuture.h>
H' K6 I4 N) D% F
#include <QtCore/qrunnable.h>
+ B% t6 b( B! @, e( D
#include <QtCore/qthreadpool.h>
, n* z6 W& I h N
/ b! V; D0 U/ a! W! y
QT_BEGIN_HEADER
0 p6 p- B! ~1 C5 D* a f2 z
QT_BEGIN_NAMESPACE
$ F5 a) ]) F9 {$ i! G) m2 b* B
! U. w$ Q% t; E8 q! A5 U% w
QT_MODULE(Core)
! y! W) w& ^! [8 y' @" K1 e* F
: L2 D6 b) `. I9 g( u& ?
#ifndef qdoc
7 V- n9 G* X9 h/ I3 ?7 M
( l/ Q! J5 T" {" K6 O. l6 y; }2 s
namespace QtConcurrent {
0 ?- t: E" A: {' ^
3 L- Q0 k# Z- N2 S3 U; v) g- Q
template <typename T>
1 [9 m0 ^6 d" b/ J0 v/ B
struct SelectSpecialization
+ J3 h) }7 f3 x$ x" M
{
! k# t0 ^) V, y' x9 Q7 p, d2 b6 x
template <class Normal, class Void>
/ R7 t2 ~6 C- `( a% Y
struct Type { typedef Normal type; };
* |9 T. C3 x9 O1 s, G+ o. b1 y
};
" `5 n6 @! h9 c9 n' K, V5 V$ @- C/ [
, V$ U8 r3 Z/ c9 g* U% ~6 N
template <>
/ w5 ~. T2 ^6 V
struct SelectSpecialization<void>
3 B& M9 ~6 M0 y; N$ |( H$ @+ _
{
8 _4 e f( {* E# V0 s
template <class Normal, class Void>
( k0 f5 ^+ e1 H6 |7 n8 W3 K, p; c
struct Type { typedef Void type; };
4 p- Y; X( l \8 m5 x; _
};
; l3 K& t9 ]- p. F; a5 B
7 C X+ h& A" @
template <typename T>
! i t+ e$ P. `2 L0 R
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
0 x0 r8 o* ^2 |4 J5 w
{
2 `- ?! i) B7 l: B0 L$ q
public:
% F4 l- @( ?: r
QFuture<T> start()
3 G' {( M/ `$ G6 P
{
6 Z% `! {0 m$ E) m# c; z" ~
this->setRunnable(this);
0 _6 i* N/ X. h6 o
this->reportStarted();
/ d& s/ }) ~' y8 g
QFuture<T> future = this->future();
/ ^3 t4 F- w2 h' @
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
7 B# B8 p. I" x( g+ K7 u: g$ Y# M7 Y
return future;
, [/ F3 M' |# Z% `" [. i4 T3 @
}
/ j* a8 |/ y- S! N
3 y& h1 X5 q. b5 c& U2 M: _) X
void run() {}
( d, F; M8 H0 e+ u' _5 o
virtual void runFunctor() = 0;
5 u, ^ ]+ i K, B8 r$ e
};
6 K9 o9 D! i, X; }: R: M
+ G ^. C+ A. L
template <typename T>
6 o8 B$ [* y/ P! |: q5 b
class RunFunctionTask : public RunFunctionTaskBase<T>
) g+ M4 s- _2 ~* t* P# z
{
+ g3 d' q+ w! m5 l
public:
( }$ m: ? P- r# e! j
void run()
4 U: m3 l/ Q" ]0 `% W& N
{
6 j4 X0 z3 X6 c2 D1 i! H+ |& P
if (this->isCanceled()) {
0 e/ }: u9 P, D/ \' a
this->reportFinished();
7 Y( \9 }- y+ d! N( L( [
return;
! I n* E. c) v: @3 m/ P
}
1 Y! k+ Q7 S/ n3 Z+ q
this->runFunctor();
5 R) r, b0 c' v0 R J1 |" a
this->reportResult(result);
: n( n# b% R$ e9 \' t1 j
this->reportFinished();
4 g3 Q1 r) B- g, i
}
9 ?! a6 j7 r9 q% X `& S
T result;
4 q5 \& r8 Q/ d9 Z7 D
};
/ G' G$ C N7 N
% S7 v+ z6 k' r: J! I* C
template <>
% U3 n8 Z1 s' G" c2 ^
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
+ Y9 {- r+ C( f+ e; F
{
* G) h( H1 M6 Y4 A
public:
2 E, i5 K5 E5 W2 f6 P5 Y k" I/ N: x
void run()
% S% y, a1 S2 U) I
{
: @9 p1 }0 }( I- {* F4 I
if (this->isCanceled()) {
. f6 U9 g& t: n8 n1 ]5 R6 y. b
this->reportFinished();
# k( O6 R% j* R) A( ]
return;
6 `3 q6 _+ {# h0 [4 ~
}
+ h2 G4 S( b+ w8 A2 B- h9 T3 g
this->runFunctor();
# A) O7 S3 S5 e! |0 D* {/ c
this->reportFinished();
; ]5 L6 P, u$ h6 s7 N. p
}
8 w# }% o1 G6 T5 G/ F* z
};
% W0 s, v( X( S- K5 {
4 c3 `+ \" M3 K7 p" r: S
} //namespace QtConcurrent
4 J1 A$ m$ C; Z# e3 k( F
4 } }' a& ^6 l) l0 M# y
#endif //qdoc
4 l8 k; e1 ?% J9 Q
]9 [; E( S, P: `0 z
QT_END_NAMESPACE
I" T( x9 ]/ }. r% o
QT_END_HEADER
# z% h8 O' e+ _) h! M' y D6 X# h
: o. D2 e, N9 ~1 m" ?0 F# _
#endif // QT_NO_CONCURRENT
* }+ P8 j) I* B' }3 Z" |5 H0 ]
) w |& x+ N, s/ I& B6 t$ o8 g
#endif
u' B5 X) H. G8 R: X6 j4 m' o9 L
( C- G; `! m& I& x2 c; ]
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
) T" w4 i Q1 ^, Q, { d( Z
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4