嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
% y" p' i: T5 x# e. h
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
) R. c# |8 E3 O/ i4 l. p% h
4 e9 l/ D# R% r# Z& i
这个头文件内容如下:
9 J" U( l6 @* H& _& z
#ifndef QTCONCURRENT_RUNBASE_H
2 p% S' e; [& W$ V- S3 G" c
#define QTCONCURRENT_RUNBASE_H
P1 G8 ^1 I8 f* ]& o& A
5 | i9 ^+ a6 Y3 U" ?: _1 y8 H
#include <QtCore/qglobal.h>
8 i o6 j8 [+ ?
1 V8 v2 M" o; H7 Z8 \ d7 O5 p8 T
#ifndef QT_NO_CONCURRENT
+ w4 Q. ~* ?- ?' b/ A( |8 a
$ [: Y# Z# j( D
#include <QtCore/qfuture.h>
& U. O5 ^: o# H7 T1 F! @. ]
#include <QtCore/qrunnable.h>
# }$ c# x( B! }
#include <QtCore/qthreadpool.h>
- b; y0 g& C1 ]8 H; X0 ?
2 D" O; o9 J) ?! H: E/ E
QT_BEGIN_HEADER
8 D2 K! @/ [( p1 @
QT_BEGIN_NAMESPACE
$ e8 f; B& P0 s, r6 K' \6 J* Y; r' X
7 H; b* J1 B$ o
QT_MODULE(Core)
1 w0 G: S! j4 b. q7 O5 d; l
7 U( Z+ ]# e2 c7 N0 l
#ifndef qdoc
9 i# i( a* L# R2 |
]( I9 w- ?3 a t2 c( l, M7 @
namespace QtConcurrent {
* x& R& a; a( Q O; b
2 w2 y/ \! @" p, S( P' \& B0 G
template <typename T>
" a1 Y* ~6 G3 X8 d) V1 ?/ S
struct SelectSpecialization
2 `" b8 [# P" R$ z9 J9 ]
{
6 }; w8 R# ~& \! F( Y, R
template <class Normal, class Void>
; j! h1 H& y! W- t7 E7 }+ ]
struct Type { typedef Normal type; };
* \4 q1 p9 [. }( L. ]8 K
};
& r/ z, q* d/ [& D* u7 M( t% N2 d
$ x1 F" D! p5 ?& Z( D
template <>
. D( S$ N8 j3 ]) k$ y
struct SelectSpecialization<void>
6 Q4 @4 @+ y6 j; D
{
: l R( x9 P, W6 u
template <class Normal, class Void>
- T- \, c" I: z; }6 k: U
struct Type { typedef Void type; };
( Z$ ]' M% b0 h6 f
};
7 o+ o) S. j q& l/ x3 K
. ^' x# f0 ]. J5 x
template <typename T>
6 @$ h: Y. L! [" ^. q% Z
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
- U! e4 w4 M# L& [! U! L7 b9 J
{
, W2 A7 E% C6 P; L: o
public:
8 s% [4 D% D3 Z( w1 I
QFuture<T> start()
& J- Q0 Z/ f: R0 w* V g7 l
{
j2 Q6 g6 I2 A1 H8 h6 J
this->setRunnable(this);
6 M$ W9 Z4 q* t8 D
this->reportStarted();
5 f. ^7 j! T' c+ S! C$ m, v
QFuture<T> future = this->future();
) V9 r7 b9 L: X c& [+ J. D
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
3 U# R& V& t5 d' `: f; n9 t# V: B
return future;
. x: j; l; s5 L5 [& F
}
8 ]/ C& X9 i+ O0 Y
8 x# S. G1 l. X8 u3 L
void run() {}
& v0 V$ ]8 f' k* r( A: D+ Y- K. M
virtual void runFunctor() = 0;
. q+ \7 L& f5 v" d; \! G) D
};
! P+ k7 [2 J% k8 y
5 q9 k" n* n* Q
template <typename T>
3 b4 m. h: F1 b. ~7 s) y: t
class RunFunctionTask : public RunFunctionTaskBase<T>
2 I/ B/ W+ g. o a2 r* y) K' c
{
4 e5 T# r/ V) s6 V0 A
public:
$ }, `8 z6 B/ ~( _. T* f+ Y) V
void run()
0 p2 r( O# |; R( Z+ ?+ v
{
8 S7 q4 c- e5 p" T6 c$ N
if (this->isCanceled()) {
& r. Z3 B3 a! W8 Z' R3 T: t8 b
this->reportFinished();
. L) b. E* m* U2 Y
return;
0 F4 U* [7 _6 U, n- p: Y
}
& L) G: j& I8 W; ~( b+ n6 @
this->runFunctor();
A3 s& c3 i- s- e! H
this->reportResult(result);
7 g U$ a( w/ }# Z; D* ~$ ?
this->reportFinished();
7 V9 l; T- _9 m
}
: D1 a% J! h9 Z: `% b; I+ k8 M
T result;
# U! o3 V% F/ i3 w/ v; {$ E; ]
};
: B/ [. X- y2 A1 N8 Y5 p: d2 d
6 k1 r6 k1 F$ x9 T
template <>
& U5 }. E% }" C6 m5 e/ Q6 E
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
8 r( F8 A7 A4 z1 v4 y# i; ^! a
{
+ W3 l4 r5 U, T$ {; C. f
public:
' A+ |( F1 d' M* F: K& S
void run()
' e% o, D. x- R- G* x4 \
{
2 y6 A2 a* B2 {
if (this->isCanceled()) {
7 J* `0 I' ^. ]
this->reportFinished();
: _2 O6 K! M4 N
return;
0 a# c+ i- x9 C5 {- m3 D
}
! q) u9 Z5 M; C6 W0 W) m; Z
this->runFunctor();
6 I+ X! A4 {, `) z& `5 B
this->reportFinished();
) O: x' X6 u2 l1 a( {
}
$ A7 j2 ~5 w# S; y, _) I
};
5 m$ w) ]" g7 h4 _- u1 O
2 m8 E& p. }( {' P V$ w6 g
} //namespace QtConcurrent
# Y j/ O2 A, k. l/ Q: `
& h% o: ~4 \8 i- D) M' ]! e
#endif //qdoc
" ?1 P1 L" T: A1 G, q. h$ u: F
' L, T* Q6 ]" Q4 t8 t' ~
QT_END_NAMESPACE
) K1 H* N' a6 n7 t( K
QT_END_HEADER
3 R8 d. g6 h: w7 n' p7 _! I1 R
" h: D( ^/ _0 q8 X$ f( b
#endif // QT_NO_CONCURRENT
0 R t5 t+ _' L
( f3 h" d# J. ]3 i7 Z6 c: M
#endif
7 F; |3 F0 l# K" {
+ W2 f7 F( ~! Y1 W
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
2 b& X) ^5 ?6 Y
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4