嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
. ]( p- J* d( H4 D8 v
/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 Y+ F5 P* A8 K& e* U! E7 [
' v q& C# Y, b0 T: Y r, W) M, q
这个头文件内容如下:
* h1 q) I. o% ?. f! [# _4 r
#ifndef QTCONCURRENT_RUNBASE_H
% Z, [9 u: _- r+ }, O
#define QTCONCURRENT_RUNBASE_H
- }+ `$ [$ i. e( Y$ q7 u
2 f8 a: }) F# [+ ^2 G# q
#include <QtCore/qglobal.h>
7 M3 B% P# p5 [9 C; t- `9 a8 R
( C" e n9 Z) p& m( r
#ifndef QT_NO_CONCURRENT
. p6 f7 v% @: f8 {$ e# ]) B/ x, M
5 E8 V, M2 p% O, \7 b
#include <QtCore/qfuture.h>
( {+ H7 e+ t$ M
#include <QtCore/qrunnable.h>
\) z7 i5 F0 b6 h; h" ^( |/ H7 K+ ?/ H
#include <QtCore/qthreadpool.h>
% _% e! [6 `, k, L( k& Y4 d6 z0 A
. Z; n$ R/ o+ _3 }8 j: u1 u) f
QT_BEGIN_HEADER
3 }, H& `+ o) R' z, ?( V) d
QT_BEGIN_NAMESPACE
+ y l' E4 L' ?! _2 |
) t# o' m$ t' r1 `9 X+ D) ^" V$ q
QT_MODULE(Core)
7 k3 a5 \' w6 m9 m
I+ l1 v$ U% m
#ifndef qdoc
% d! k* _* o" P9 b* O8 c1 l! L
% {5 r# m: b7 N2 _1 _9 g
namespace QtConcurrent {
& _0 Z, p' O& p1 Y
9 U$ |4 V% Y# H( ~ C) _# w9 D4 ?
template <typename T>
4 M, m, N) u& x, M+ z. }' [, k
struct SelectSpecialization
% C! c6 n* y) i( G2 o0 `( B
{
8 V; F- [: ^* u! \- i
template <class Normal, class Void>
7 E" u. i& H% C6 N7 Y
struct Type { typedef Normal type; };
9 q6 L( Z9 K: a* [
};
5 ]1 u8 ~: Y/ U5 l9 }3 W
+ H8 `6 F1 @# r0 w
template <>
. J$ G, `! T. D' Q
struct SelectSpecialization<void>
$ [: J0 z, E1 N3 j7 _* ^% V
{
* R3 x& ]0 ?1 l, b. h: O
template <class Normal, class Void>
5 [$ Q4 X# j& b0 r
struct Type { typedef Void type; };
9 M1 t9 w! P" S7 T+ I5 N6 b
};
2 k% C0 o$ M! Q; i
' B6 U4 @4 T5 O" f, A
template <typename T>
0 p' H, B6 P( {8 c/ P% Q/ {9 z
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
. D2 }7 U- c" t0 |
{
8 G7 y% U/ [! j F0 D
public:
4 x3 S0 i1 g( e8 X
QFuture<T> start()
7 g1 b5 [1 p( J+ N1 i
{
4 f" K( j+ y! w9 C7 w
this->setRunnable(this);
( R: K; f! R( N& M$ m) { S' N4 q" s
this->reportStarted();
0 H1 N0 q4 t$ L" I2 h/ ], u/ N
QFuture<T> future = this->future();
% N" }( l* A6 q- f7 _
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
# Z# D# X" X" [1 h. v$ j0 F" V
return future;
5 @$ Z& ^8 K5 J, `, @8 ~5 k
}
2 l- N1 t _5 I8 d5 L
: r1 x# Y" A/ R8 M8 B
void run() {}
+ |# R5 Z5 ~, ~( ~$ I; q( _( V
virtual void runFunctor() = 0;
9 Y! _3 P. F% r& l6 w3 ?: X
};
. D/ l& R- U- M* T7 [) j6 t
$ h' Z. |. P8 [- \! V8 Q
template <typename T>
) @; ^' S- n* O
class RunFunctionTask : public RunFunctionTaskBase<T>
) K- x1 ?* b; Y6 U' e" r
{
. x2 ~5 B i" ^
public:
; b/ c: j+ C% X$ @; V: p4 G5 {7 d
void run()
0 F; D2 t' d& I
{
# ~+ [& N& O& S2 Q+ P+ \
if (this->isCanceled()) {
1 [ L$ Y; T3 H7 p
this->reportFinished();
|# {" V! Y6 E/ M( M3 l
return;
' Z0 t6 Q3 d1 P" ?4 n0 c' u7 M
}
& B* g) m& @; b$ r6 W, v
this->runFunctor();
0 w0 j4 u3 m* }2 h8 e) I
this->reportResult(result);
) a* M0 y7 ]7 T" c- @5 c& G
this->reportFinished();
" j% f+ g% m( R, E, k6 A
}
* }, o& a, c2 N- G z) Y2 L
T result;
0 `& E7 n7 l# p5 t7 H$ S
};
% v% J1 H$ D7 o" k. A! p+ Z7 |
: t% z% M$ T' \
template <>
% \+ P p+ c# Z
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
0 q5 D7 C9 J8 A/ @+ K' R
{
; c x, D9 t! o' q
public:
8 w; n7 V; y2 V7 _' U
void run()
3 }& Z2 w0 q, G: \" y( [
{
' }1 W" n w* ^. j. B1 _7 ^7 P1 l
if (this->isCanceled()) {
/ C$ p5 e. `( [% k9 ?+ s
this->reportFinished();
2 n0 \ N$ b% w, s
return;
- H5 ?& H, {: W1 S
}
4 o1 ?3 c# I4 Y1 {6 o
this->runFunctor();
; ]; l9 Q- H+ Z/ p5 j) p
this->reportFinished();
* W2 W' f9 a0 u+ v' e$ p
}
% y- c- `& H2 T% ?; A
};
4 G- E- p6 \% x* J8 |% ], Y8 ]( T
$ t" p; N- \& e) y8 z% a, R8 Y
} //namespace QtConcurrent
- D' q3 N) K: J. @- M9 s) `! P
: A& Q& d4 G2 r7 w. Q5 c3 t2 x
#endif //qdoc
{0 y* `. P2 i: ]5 j a; ?% ~
# p0 I& [: D% B8 J; J
QT_END_NAMESPACE
) j' M! G3 Z' h# u0 Q. n
QT_END_HEADER
: u- L) s, h8 b& V& o' m( t- s
5 n) z7 D+ A! H; h' g0 o) F, B" s' Y( z
#endif // QT_NO_CONCURRENT
) G: d0 b* Y# S
" u# ~' i" I# @
#endif
2 s# R5 S7 k8 K
6 @0 I: e) D* ]( b6 k7 S
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
- ?; B$ z1 r, v/ b
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4