嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
/ G" f& o, N: Z- a/ W1 [" g4 \
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
, p9 m" F& j6 ]7 @- y) I7 R
& c6 ?1 Y* S& Z& K5 `/ j5 f
这个头文件内容如下:
' j" h6 j1 z9 g. U( [# D* n0 w7 g
#ifndef QTCONCURRENT_RUNBASE_H
$ h, b, E! M9 [: X) X
#define QTCONCURRENT_RUNBASE_H
% t2 N) n1 u8 u
8 y! S5 Y# u& b/ j
#include <QtCore/qglobal.h>
3 N2 O" W/ o- T5 d: j5 g2 w6 @! l& _
: }4 R# b$ @+ j
#ifndef QT_NO_CONCURRENT
0 |1 `# M+ S( z5 r
5 O! ]9 G) D! R w' `8 G) b1 ?
#include <QtCore/qfuture.h>
8 } ^$ f9 B- i
#include <QtCore/qrunnable.h>
# g- C- A P( \; T s. D
#include <QtCore/qthreadpool.h>
7 R& L, i( t5 v
% m+ D4 W* Z/ A
QT_BEGIN_HEADER
+ }* m. C5 S) m7 [% Y" Q
QT_BEGIN_NAMESPACE
! _/ \3 i2 {' h. {" F9 a" B) i3 J$ o
) c K9 u2 d7 _2 u+ i1 `
QT_MODULE(Core)
/ e7 p' Z, s7 a
* x& p+ J& ?) F4 A
#ifndef qdoc
5 R* R' F7 a" W) a0 M% G' Q6 I6 m& D
9 q& ~" V3 r4 e
namespace QtConcurrent {
; e" {; ~2 {+ G8 Z1 R
# T: T" N2 C4 f
template <typename T>
* \$ q: ^$ E3 u( j; |* i
struct SelectSpecialization
3 g# q9 C# l7 V
{
. p* A+ K' i% N( k3 D
template <class Normal, class Void>
& D" w. N* j8 O* V" C0 x) U3 r. {( u
struct Type { typedef Normal type; };
/ {! ?! w8 q: K: O
};
" L; k" i0 Y6 B: T$ O8 O! I: a
, K' _7 A+ l, r( c% d g1 L
template <>
& q, I% n4 k0 ?) f( x! b
struct SelectSpecialization<void>
/ J) ^1 a6 ?9 j4 n4 j( Y& f5 M% z: N
{
, D6 D( C5 O. l
template <class Normal, class Void>
8 Y5 ^! g# g* V, B( s
struct Type { typedef Void type; };
9 [6 k2 f; T" n z. D
};
) N% Q6 M% s0 s
& i4 m5 d( V, \8 E3 @' e2 O
template <typename T>
# b, K j. ^: w3 R/ t
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
) ^2 G7 g0 j: t% z2 H
{
% M9 b7 i1 L: T. l5 v
public:
, v2 c Z6 n3 m ~
QFuture<T> start()
' | `9 _" {8 F! E3 n' H, E2 A& ]
{
% l" Z$ t. \& W5 B7 z2 H! I: q2 [
this->setRunnable(this);
: x" R" { Z1 n7 {2 z
this->reportStarted();
w1 {" j$ J+ O9 b# W& P& Y
QFuture<T> future = this->future();
: d9 F) t4 q L% H2 L' l
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
* p% Y" P f$ w. w) }
return future;
0 ?" {* `% R2 T
}
6 s. I$ { i& q: ^
1 F' _4 |3 P4 y! {( [
void run() {}
/ m7 o+ ?. i) Y& f _
virtual void runFunctor() = 0;
2 D7 ]" U9 C9 ~
};
: o% T# }4 r& \8 G$ G9 I
3 a8 U& ^$ C7 d( t* ^' X
template <typename T>
$ _' Y5 ] l& q1 a e$ z' w$ z
class RunFunctionTask : public RunFunctionTaskBase<T>
" {+ x2 w: R+ s7 h& G; `
{
o7 J4 n3 L9 q" M
public:
; H; @* X! Y, Z1 K! H1 {$ i$ w
void run()
) y- D5 s% D0 e
{
4 I" O) A8 m/ Y9 q
if (this->isCanceled()) {
& C: I* I* y( R/ P
this->reportFinished();
5 o# ]" r3 Y1 b& A
return;
2 E5 [0 ]/ x8 f! `- h, ~1 S
}
# W, q9 H( b4 U9 [5 U
this->runFunctor();
) d4 b- |2 O9 i8 C
this->reportResult(result);
4 b1 G+ I" N |/ @* {
this->reportFinished();
/ W1 j/ P: `+ k F" g) H
}
7 E. N* \9 S! J6 d) `
T result;
5 G2 X& C! n/ _8 X% \
};
# T$ E# p1 ^' H3 a+ o
! V/ {9 |. G: \ f5 u6 l
template <>
6 o! d# W& n9 P. l; y9 y4 w
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
# J' @) ?& [! x, Z$ \' Z8 u
{
( I* S+ R! I: r
public:
0 }4 [: Z( h0 B) @0 c m1 ^
void run()
b% g$ D# E; Y" G+ J( B" e& j
{
! o5 G/ ^5 W5 F! h/ x
if (this->isCanceled()) {
; s! `; O) l2 D5 {
this->reportFinished();
# Y* S: c! [/ k, E4 c9 D- Z* k
return;
( F! |( |* c: c- q, Y, A7 y0 t
}
! C* m4 L' v6 e
this->runFunctor();
9 X$ z( C/ F) G
this->reportFinished();
! x+ F" y) {: S& | B( h$ a5 V1 Q7 H
}
U; o( F% n2 e6 h7 V; [
};
- o" s4 {$ N& W3 t0 s$ Y6 J) Z
) a! @: I; J6 |
} //namespace QtConcurrent
) \; d7 i8 b+ G, x
3 `$ U# X3 W: B) X! l
#endif //qdoc
: Z# V9 [$ Q2 {$ V# P
3 Z# D. Q' Y4 g$ {: R/ J4 }, s; K9 h
QT_END_NAMESPACE
) f" W. A0 A7 e5 m5 g5 Z. t
QT_END_HEADER
5 v/ H2 l. s# n+ j( K' c. h; `: W( w
) C1 l; J) F8 t/ Q
#endif // QT_NO_CONCURRENT
( T1 ?, b1 S* _) P
+ t% D2 }0 U; k4 X/ y8 ?* l
#endif
- f4 L. u5 l5 O
( a# q C' D: d. h. K1 N
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
# I7 l4 o. c; F, ~" t9 K+ `! B
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4