嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
: r; ~7 t5 G) M9 J, @ ~ E6 z, S
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
/ u$ \ r8 ~# h
8 R! F5 }& c) S9 I- _$ A2 n
这个头文件内容如下:
1 |* B9 \9 e; b* K- S$ I
#ifndef QTCONCURRENT_RUNBASE_H
: J3 k$ l9 ^, Q! d B( k
#define QTCONCURRENT_RUNBASE_H
+ c. M# y" h! j# m
, r! {! Y6 P1 z4 v; x6 u1 L4 K
#include <QtCore/qglobal.h>
, S b! p8 X( W% m) d6 V
2 t- Q% N7 V/ M! Q# c# U: M" Z. @
#ifndef QT_NO_CONCURRENT
6 n/ W- g& A8 w
1 x( k; `3 |. e1 @5 F& w
#include <QtCore/qfuture.h>
7 x0 T9 g2 i) W& p# o
#include <QtCore/qrunnable.h>
% }5 o- E3 a8 [
#include <QtCore/qthreadpool.h>
5 ]4 N; d! E1 d& h. a+ z
8 ] w8 m6 u' t" i
QT_BEGIN_HEADER
" k7 R: V5 k" }% x$ {/ P" {
QT_BEGIN_NAMESPACE
1 a; Q+ i2 r' J8 `: r3 N
^" [7 g% W' L6 M$ `
QT_MODULE(Core)
' y% o* w- G4 @6 S* b
( ?$ |1 ^) M4 [6 ~6 G/ ]
#ifndef qdoc
$ e- z% g6 E8 a# C
% L0 |" v6 @$ n! X3 U; V: u2 h2 p
namespace QtConcurrent {
2 _6 p% ?: b8 \8 P" {
4 A" P1 s6 q9 T- ]" C2 p- O! t2 v0 M* A
template <typename T>
5 W2 ?4 C Q* d& ~' w/ I" I. s n
struct SelectSpecialization
, E# \' P. v, D$ y
{
) U9 k# T4 c% `/ i( D p
template <class Normal, class Void>
/ m9 G4 A5 \/ P9 U9 d$ {
struct Type { typedef Normal type; };
+ b p0 `. R$ g0 _/ m
};
s5 } z. C/ d8 t. \7 M9 m
3 m* `& H" ?; O, l9 a2 k* M7 e
template <>
; U# [4 |7 r- f% r1 i3 ~
struct SelectSpecialization<void>
5 h# g$ `2 t6 ?! Y* x- P( S
{
+ u# X2 [! _) W; T6 ~
template <class Normal, class Void>
) v- z R# Q$ d6 O) k
struct Type { typedef Void type; };
: m# E# z$ r: x; B- }
};
1 C( V+ G6 a- A% l7 c3 J- q
! k7 R$ Z$ e. U7 C
template <typename T>
n' [+ k: C, {' \# F4 F
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
?* Z% l2 [7 y! K. D! X5 ?5 a
{
6 Q$ T, J: k: T6 B; W' Y8 F
public:
M( c" ?- `+ X. P
QFuture<T> start()
" ~' ~5 z! U7 B2 ^) V8 ~
{
- O$ k/ ?5 ?# n! x
this->setRunnable(this);
/ U! l7 |0 J7 {
this->reportStarted();
2 y( P1 E0 c* O) Y, E
QFuture<T> future = this->future();
1 l# m5 G) v# o1 ^) @2 }
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
; i& w' F0 h b! Q
return future;
7 c% z% `6 M" G- ~" c0 _7 i
}
% U$ L! C3 K0 T) U7 o9 r
: V# i- [! p8 g9 S& ?) X! n
void run() {}
& N# W9 [5 w$ s" Y- c7 e2 U* G* f- C
virtual void runFunctor() = 0;
# \6 d6 j# i3 d
};
) K8 S# c% N! R! U, U# e
) d7 |/ Y( u+ _
template <typename T>
, U; ]( m* f7 b+ c% p) P& h
class RunFunctionTask : public RunFunctionTaskBase<T>
/ K" |& f! d: x2 o* ^' t" h
{
2 H# H, Y" D" j j ^( X
public:
% }' f1 L1 } d+ `
void run()
( Y( O( k: g, l8 y6 K8 w$ R
{
3 R: F: ?# \9 K+ p
if (this->isCanceled()) {
$ Y! H+ W" n" l: O
this->reportFinished();
7 D; J/ r+ T+ D% u" |$ {
return;
# a* U& P) V% k, ]
}
. @9 i( P7 E$ z) `
this->runFunctor();
m' O5 d) X6 J% F7 P
this->reportResult(result);
$ Q6 E3 @0 B; y+ e0 q2 n, O" n, z
this->reportFinished();
0 F9 l0 n1 Y$ G3 a
}
# J- }+ R. C0 m" ~
T result;
* n: Y# L3 A' Y6 J. J9 z# J6 ~
};
3 W0 ^, a( U' d _# e# a
4 [/ ^0 X, ~' T6 W2 w
template <>
. \6 `2 U9 ] v: S2 N" G$ b8 y5 x0 c
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
+ }! V* i' ]' r/ n: O8 {
{
) n/ [6 N/ L0 h4 K- R2 L( o d
public:
+ i8 g3 Z, u1 C" @& L) ]9 O, F
void run()
5 b+ B5 F Z% ]: [1 m
{
5 ?8 |, A. C# Y
if (this->isCanceled()) {
% l9 {, y* B: G
this->reportFinished();
$ t* J' c9 M h+ t$ n# W; T& d
return;
! v9 d/ i. t' t N
}
5 D$ N, v0 [6 x" N0 h
this->runFunctor();
2 S+ U- A$ H4 r$ |
this->reportFinished();
- m ]' D4 r3 Y0 H9 W# }# J* K% ?
}
" ]" Z; k* }! {( g" @3 x2 N
};
& S/ y) O0 K; n( b
4 L8 f. k- s9 D0 s
} //namespace QtConcurrent
3 m% m) {2 M' r1 T
( O5 b$ a/ Z, g- V
#endif //qdoc
) V3 a' N( f' g2 p
/ a! L8 A" l6 f, |8 J$ D/ A- E
QT_END_NAMESPACE
) T( X( m6 u0 X$ Z# ^5 e: i
QT_END_HEADER
% k6 b& k6 ]3 x4 M% G5 Z7 e
) T8 @3 d# i$ b8 r) I* b
#endif // QT_NO_CONCURRENT
+ B* V9 d& A4 @& A6 k, I
/ J# G; f1 b0 |( I7 J+ C
#endif
& C6 A/ x; q7 r$ Y
! k6 {% V* y4 ~: U D
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
4 t) a& x m$ L8 I+ a% V
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4