嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
& j7 F: Z a0 L0 k( G; ^' G
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
: Q' N" p3 _+ ~0 G' k$ E5 G5 }9 k+ T
& Q) x: ?4 _4 I9 w
这个头文件内容如下:
& t$ z4 N+ \5 j9 |* K
#ifndef QTCONCURRENT_RUNBASE_H
. I* L0 X8 F8 M1 l: e4 E
#define QTCONCURRENT_RUNBASE_H
# U& U& g4 A+ U1 x: P3 C
9 J1 `+ o' C' l
#include <QtCore/qglobal.h>
+ i }. v7 {& A- j- Q
; A6 C' S+ l# a" J. x% G- O7 Z$ t
#ifndef QT_NO_CONCURRENT
1 J6 J8 F/ ~2 ^4 F" w7 r
3 S2 q) s3 |) |2 _* Q6 O
#include <QtCore/qfuture.h>
; \. h) a- o% B7 f' V, V+ j7 w
#include <QtCore/qrunnable.h>
/ ^) d* z) y) Y3 U3 O9 v. o
#include <QtCore/qthreadpool.h>
+ F" U* l; N7 ~
+ F; U% s& g7 _% H+ m) M
QT_BEGIN_HEADER
' U5 _, u- t, w8 X( n
QT_BEGIN_NAMESPACE
* G' Q4 Y9 U3 x# N' ~" T& A3 T
0 o' e s! G# E+ }. @2 I2 Z
QT_MODULE(Core)
+ R' u" i X1 }" g% A' D
3 s. [8 ~9 l8 @, |" T2 @
#ifndef qdoc
6 k& j, l. j+ p2 ]1 [2 W
& m2 X2 z' I% i8 s# Y4 F: A
namespace QtConcurrent {
$ J" _% P `. e, E6 f% l" M
]/ ]& ]" [% W/ j) O+ f; P( S
template <typename T>
' E/ t+ e& b* U5 i
struct SelectSpecialization
) z4 f7 v n5 x$ O6 k6 |' o+ S5 U
{
6 ~- Q0 r, z7 a" [9 Z
template <class Normal, class Void>
* y$ F R- R4 x1 v; j
struct Type { typedef Normal type; };
- `4 x2 Q! Q* ]/ x
};
2 E, H' f7 H: R; ]& u6 T$ J
. p) T0 m! g' V! k6 }# j
template <>
1 K6 W7 n! c$ m% M9 R$ D# p
struct SelectSpecialization<void>
0 h& G6 |/ h" g& T( _' ]
{
1 J" j" `* `$ M
template <class Normal, class Void>
; @2 T% R2 I; T( m" u" |
struct Type { typedef Void type; };
# ~ `9 }% K/ ? _! S
};
5 y, J+ O3 U+ N3 L: b" d
. }% c0 J4 V8 H! ?
template <typename T>
: D; u6 e/ \. F) K" z2 E
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
{+ ~' [# _: e, F) z; g
{
8 A3 M) p9 ?7 ?6 w8 l/ A
public:
( t" V+ P9 r1 J) x0 N/ h* A$ j
QFuture<T> start()
5 z) y* l! d7 T/ {9 s# ~
{
- V+ F/ L( U: W6 L# K5 B" P
this->setRunnable(this);
( ]& s$ O. i6 m7 t
this->reportStarted();
/ A1 {& {, M$ [ q
QFuture<T> future = this->future();
6 l" N( F7 B$ K9 B n3 e' P+ d: ^
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
! L* k' k6 ]. }, M0 b: g
return future;
$ Z1 \7 O4 W, ?. o* z% w
}
! v, z& T! g% D* v% n/ a$ {
& f- e% n6 d) b' R. A5 c
void run() {}
3 F; F, n7 L& ^4 q
virtual void runFunctor() = 0;
2 N0 o& c! W, T
};
* O* D% d) } t ^6 r
; j6 B6 {! o( s; B
template <typename T>
. i" s, w% B# X: i: L- J
class RunFunctionTask : public RunFunctionTaskBase<T>
: b/ P1 `7 V, ]3 Z! U6 I& r
{
8 S" z6 {2 q0 J4 U% p
public:
$ p3 D7 t) v) ?7 ~* N
void run()
@5 S0 Z# Q1 i4 Z4 @1 b( [2 d5 v% n
{
: T! r1 B. \; H9 E
if (this->isCanceled()) {
' Q' Z5 \2 X. N0 U5 }& Z8 T+ U9 `
this->reportFinished();
9 g$ v% |2 Y5 q4 y# D: e7 M$ x, h4 g
return;
& }) a2 C; p( |$ e6 A* M2 C
}
1 v# E6 w4 K) e
this->runFunctor();
% N9 L: w( a T E6 n, x) b7 x
this->reportResult(result);
& ]4 w b- l3 K
this->reportFinished();
8 m3 p& L- O4 M$ P) F' G
}
; O* e+ a7 D! }, ~; e1 s
T result;
* P. m" }/ u9 _# w! y o/ a; ^2 I
};
9 B4 l! d3 R6 G6 z r
+ F$ b8 ]9 L/ s* `
template <>
2 n$ n2 o. Y k* `
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
/ F& o. n5 P$ W/ o0 e
{
9 N0 S R$ Z0 G) `+ N
public:
1 D; _- Z3 b7 x& l4 b/ _
void run()
5 h) R! g- S r- y6 Y; {2 L! h
{
+ ], m0 P* J, Z! L- |
if (this->isCanceled()) {
% ^" q: q4 _9 P3 s( t4 E
this->reportFinished();
# a- t; [- u( K: g: h
return;
; \' k, |6 E& B! R
}
8 W, t& _+ O K3 D: i0 D
this->runFunctor();
2 t; F8 j5 C: |
this->reportFinished();
; B9 \% \) E4 q$ e* p
}
5 E5 E1 p. R3 n9 g- N" P9 E
};
! m6 ^9 M: l2 k% r8 h
) Z4 A6 I1 b+ W4 A; ~' A
} //namespace QtConcurrent
3 C* n+ T/ L2 z2 j
7 Z; u; I* ^, n' ^( j
#endif //qdoc
, {. c9 z0 m7 k: {$ c/ o7 d
' t- u) c8 V9 w: h
QT_END_NAMESPACE
; j& F" a9 W/ g+ L" u7 S
QT_END_HEADER
}- e ^' u5 C: L- e8 Z- R2 I/ [
4 }/ f, k) w2 G
#endif // QT_NO_CONCURRENT
0 S' k X+ O' O5 a" \0 Z
7 J: ~' s1 a1 |% _* y. o( k' C. R" {
#endif
3 l0 c& x k+ {( P& T
& i- u0 s# u6 u# x+ G1 ]+ y6 T
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
( N, Z& t) H- |* I$ L
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4