嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
8 _$ N9 _! a5 _8 C. w
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
+ ~9 O' g( @5 E1 `2 t- `
' e* Y/ W# ?# H6 q) f' q: T
这个头文件内容如下:
; r# e, K3 ]$ h" `
#ifndef QTCONCURRENT_RUNBASE_H
* D8 x4 I3 u1 f. u% Y6 ^
#define QTCONCURRENT_RUNBASE_H
" t, i. R0 f: t
- n" K* F2 u" |& ^. H6 E$ S+ d
#include <QtCore/qglobal.h>
4 n A2 Y8 f4 Y% p/ j7 W
0 p, Q( @1 F* w4 d8 y
#ifndef QT_NO_CONCURRENT
$ N: _' k2 [4 ?/ E( i
6 [% h% G& E6 v+ p
#include <QtCore/qfuture.h>
" S% z2 a6 m+ U6 C( o
#include <QtCore/qrunnable.h>
6 t4 V3 n0 w+ c, X- m4 L4 o
#include <QtCore/qthreadpool.h>
* T% M; ?* e0 Q( f# Q$ U2 a
0 ]" w$ ^& o5 R" ~' ~3 \$ p0 p0 Q9 A
QT_BEGIN_HEADER
2 X( G0 B% F8 d d, ~8 u
QT_BEGIN_NAMESPACE
3 e/ P) O7 H1 y( ?$ _
- z$ X4 }6 [4 R5 h* S& x7 k
QT_MODULE(Core)
. T" v2 l7 u, D& N" }) Z( ^
& E% S8 U, F9 g2 i! @: ^
#ifndef qdoc
6 Q9 M# |" O6 L) w; Y. L
5 K% w# R# |. t: G( C# l( w3 f5 E
namespace QtConcurrent {
, \' i' q+ V! P. d5 }1 Y( z) V. J
0 k. \" v. L4 t8 i
template <typename T>
+ n) m* Z: f' V: b3 @, a
struct SelectSpecialization
5 ^' |7 V+ d# d7 A# x
{
7 i/ o+ u' G; s1 a* C
template <class Normal, class Void>
, }" ~9 g w' H. Q
struct Type { typedef Normal type; };
( e" | ]. |' U' X' Q( a( K
};
3 G, }! k: o; j- z1 ~; U
/ f; p& h5 x6 [: }
template <>
( f& H/ B+ e% i. O2 P1 T
struct SelectSpecialization<void>
& d2 P2 q0 ^- R9 Y" K: ^2 r# w0 q
{
3 g. F; @1 U$ w
template <class Normal, class Void>
" ]: \& J) s9 t
struct Type { typedef Void type; };
" a6 K3 k e# j4 [7 k4 U0 q
};
; u4 C: |: l. d3 ]0 H, _% C
2 m4 W) B0 f: r9 w7 n
template <typename T>
% e0 X/ {2 {( l3 W4 i3 \; g7 a
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
1 h* u3 S, F* u# r. D7 l* E7 [
{
7 l; B& R% I0 \ m S g$ [. M
public:
: R( o' ]/ {2 A0 u
QFuture<T> start()
, l+ ~$ X% e4 P* A8 [$ p2 [
{
3 a" }/ n# i, N6 ]
this->setRunnable(this);
6 k2 t* Y$ K. }. [# |# ]7 L
this->reportStarted();
9 ?; H2 d% R" q6 c
QFuture<T> future = this->future();
/ T$ ^( u7 J) q" P; a' J! p. r
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
' c8 U. ?$ y( N
return future;
, C* G: \2 _( V$ s
}
! g+ g) g N# F
, \0 s+ _+ c* K8 h: R. }( ?
void run() {}
5 n) z. L* m; h- y! ^ \% t
virtual void runFunctor() = 0;
& w5 I# X1 B0 V' L2 z/ U M
};
7 ]) e0 l/ _/ W0 W8 N) I! x
4 r K6 W1 i+ |: B9 G U* M: A
template <typename T>
; ~: N/ L! Y+ b% d B$ B" o/ n
class RunFunctionTask : public RunFunctionTaskBase<T>
v7 Q; N+ f& { M# a* r1 |
{
, }! |5 z- }- c+ ^6 y* n ?# F
public:
4 [8 `" G) P A1 ~4 v: R
void run()
3 l3 Q9 w9 P2 E( i$ e% ~% d
{
3 j# q# F. W3 @9 l' f
if (this->isCanceled()) {
3 j5 b) x, d! x9 _% j
this->reportFinished();
/ U+ D! P3 O) N" d6 N' i
return;
) |/ B* S7 T" X( S" Z/ T6 L$ ^
}
: b3 b/ p% t4 k2 F1 l
this->runFunctor();
+ l; e1 K- u- _* h: i* S' `
this->reportResult(result);
X6 @+ I. k* L8 p
this->reportFinished();
) _* Z) f" I3 M F) ]0 `& Z
}
3 Y- Y$ {5 E) l- W) a
T result;
! c1 Z7 M/ U* Y( x& h. a% D3 S+ s
};
4 z# u4 C3 ~7 ^9 u7 m
6 M( M" v# e1 |
template <>
2 C& z; I* W$ q
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
# t1 d* H( X% V
{
$ X3 O, l% A. X# M# s# L
public:
+ f$ Q: Q; [2 w+ E+ e, U$ _
void run()
; ?) ?. \$ D/ _0 ?/ C
{
/ x; q, `) N1 k! q- h
if (this->isCanceled()) {
& a ?3 _* V1 x
this->reportFinished();
: C3 ^+ W1 x: E* S
return;
5 [9 Q& e, T: ~3 G+ K' {! t4 Q
}
% ]- q* Y3 F! ^9 ^$ Z. ]
this->runFunctor();
! A; [' z( `0 g" g" d! r6 G7 x
this->reportFinished();
" x, n; m8 N, u4 ~" j
}
. { |8 @5 I+ I9 g
};
7 B6 W8 z0 _) f; j7 c/ X/ e4 C
) j$ c: y) S' d" o% w+ i& t
} //namespace QtConcurrent
9 ~6 U# I+ o+ h- ^ `$ D) a
) k4 X. K: |# h X2 ~0 m6 u
#endif //qdoc
# l L0 }. f# X. d. Z Q5 V/ q
* L* M5 a3 N) H5 q( F# }4 [
QT_END_NAMESPACE
S2 N5 j$ n6 N9 G9 l
QT_END_HEADER
0 v9 b; ]/ c0 h q6 V( ^. o
6 W$ w% T! l6 M* i( B! s' ?
#endif // QT_NO_CONCURRENT
0 P% F, j. M G1 P
# K% k: G" z1 Q+ O
#endif
% o, Z6 `4 b5 I+ s6 |$ E3 X9 q: C6 s
" t( e* [( y' t/ g* b& H: U4 G
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
/ t9 [8 V9 k7 O; O. l! e; }/ s
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4