嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
' S6 }, X& z. }# Y J6 c- d
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
6 r- Z- i! Y! L
$ P4 f, M* d/ Q7 l3 W' V5 j
这个头文件内容如下:
6 W) x: h" N6 R+ @' {
#ifndef QTCONCURRENT_RUNBASE_H
" e& X1 g3 R% b2 X! X- L
#define QTCONCURRENT_RUNBASE_H
1 E% I/ @* T) [/ |$ w1 b# W% b
- z9 d; ~7 r& `/ J0 e; K
#include <QtCore/qglobal.h>
; o9 R `# h1 V6 O. M. h; d/ T
8 ~4 t! `0 x& M$ _ N, n! g3 ]. O
#ifndef QT_NO_CONCURRENT
; L) i7 w& e& i8 f( a. Q5 a
9 v* M3 ^( |$ M+ V. Y
#include <QtCore/qfuture.h>
* n6 ?2 B+ n+ \9 H2 c% D, _
#include <QtCore/qrunnable.h>
& i7 k# b! o& y1 ^; X
#include <QtCore/qthreadpool.h>
1 G u2 W1 z0 w% ?7 {
! M4 l$ n# i* a0 p2 ]) q& I
QT_BEGIN_HEADER
- _7 f/ _" f0 }. M4 z
QT_BEGIN_NAMESPACE
7 {" a7 g3 O+ d
4 P/ A% u9 g6 W* D9 @, A" f. k4 `
QT_MODULE(Core)
4 \# n4 x5 H }0 [% K1 @* R: F
+ u' C- H( ~, x7 n, o
#ifndef qdoc
! P# t! r& H/ [2 ? `. m
) |& C: S2 O* }9 o0 i
namespace QtConcurrent {
. }5 X, X6 A% Q) \
* g" N3 ~ @# [4 T8 o+ p4 w5 n5 F
template <typename T>
" c1 t7 F+ H" \. _. ^" v( E
struct SelectSpecialization
8 h+ @1 [ ^8 ]/ \) V
{
9 E' u6 ]& N' C, e
template <class Normal, class Void>
8 m# ~9 ~$ p$ C8 C: c
struct Type { typedef Normal type; };
/ s6 j& [, ]0 L3 W6 l
};
8 F2 x# W r3 Y- Q+ A
0 [' c8 ^# h& G3 s5 [
template <>
# A9 C7 n. v" a1 u, Y
struct SelectSpecialization<void>
" J# R0 r' u, l3 z+ l4 D+ p
{
7 X/ o- F1 T |& I: u
template <class Normal, class Void>
& o# U. d0 j) i. _$ o' r' r% H4 K
struct Type { typedef Void type; };
0 D* s% D7 j* j7 t
};
- ]+ F1 C( `7 N; c! t; y& }
! \/ l( T4 y' u
template <typename T>
" x2 S9 c4 V! k
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
8 s! z1 O. p* l1 z5 ]
{
- L' I7 |9 F6 E1 t
public:
7 P4 V. y& T- y
QFuture<T> start()
7 |! w& z: }7 N' _% c( m/ |/ W% B
{
7 G" K$ O/ a% Q) C: T( L
this->setRunnable(this);
4 t! i0 D: Y! L( a
this->reportStarted();
7 U" r/ z$ f3 {+ k+ Y# [
QFuture<T> future = this->future();
! W% [( I" r2 A7 {! k
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
& J# c0 I$ i" |1 W% c- s
return future;
, I! H' h' P0 ~8 i5 Z
}
5 ~5 m! n1 G( w% ~
! {+ R7 F) G0 `9 D( U Z/ i7 E$ a" k
void run() {}
% W& H: O. a+ ]4 v8 a
virtual void runFunctor() = 0;
7 T! M" B+ B. R+ Z$ K' A- S
};
2 ~+ G/ \3 J( a) q {- [
0 o, C- L) I4 q6 G: ]: ?
template <typename T>
" \$ T/ k3 y( o- p4 i: a
class RunFunctionTask : public RunFunctionTaskBase<T>
% e/ Z6 ~( @5 @- T' b
{
) z* _) X+ z* S6 d7 `3 C$ X
public:
% p4 q# f0 j- X! X/ X
void run()
! U/ j2 `3 w9 T# e0 d) L5 a: w
{
- x4 F$ d1 ]! c8 \0 N7 y) k
if (this->isCanceled()) {
0 O0 V: f! E5 d
this->reportFinished();
/ a3 z' o; b N, q9 T5 e
return;
$ Z2 \. e {( ?: J, c- ]
}
' s! {& Z7 y0 w/ Q
this->runFunctor();
" {/ w7 x6 ]; X2 B, {- s' U3 Q/ ?6 D
this->reportResult(result);
/ \% j n* d2 A
this->reportFinished();
% a w' T9 S0 @- ?0 e
}
) X% s) M3 ^, n6 K8 }, ^
T result;
+ G* M3 W( R; E: n. _5 k/ t
};
; \6 S# {$ T: c! Y; |( Y' Q
" _) I; _* a7 S' U
template <>
/ @- ]) ]+ w3 A/ {1 S7 K
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
1 c: d4 g- x" [& ~ n! n) [! i: o
{
) S- q( a0 O0 y" P! G+ a4 i% m
public:
5 q& q& R% |- J+ O( o) L+ f R( n
void run()
' Z) z" R- n6 \4 W: n. o. o/ W2 \
{
( O* R) r2 o1 v0 D+ m
if (this->isCanceled()) {
, c7 h+ E3 [0 |8 r* o; Y8 ]
this->reportFinished();
1 w6 q' R. @$ P* [
return;
0 w. @- S' y& |8 [4 @; o* G( ^
}
* T3 M3 L9 y6 \: e
this->runFunctor();
6 s; K: n$ W* [. z9 s. l! ]0 K
this->reportFinished();
3 T& E" ?! ?# F3 Q6 X5 \# P% C
}
* w% C3 X! ?* r3 \1 @8 f
};
, R& ]; s/ w1 T4 L) `( o
6 e7 E) M' ^$ g- D
} //namespace QtConcurrent
* {6 b' q; y$ {8 k* U- F; _4 Z2 A
. m; H3 H* X2 Q. o1 D: @& C+ a
#endif //qdoc
, P: g1 [: `& `9 }# V
z# K3 c9 s/ W$ r3 p# C
QT_END_NAMESPACE
/ C, H# S0 j% {# m
QT_END_HEADER
9 a" j, g. t+ e. j6 m5 ]* R3 u4 c7 Q
p; ~, Y! t' U/ C; b: m: l1 \
#endif // QT_NO_CONCURRENT
- L9 \) |/ {6 Z5 @0 d5 S
% o* O6 Q8 n$ {5 x
#endif
& _$ s/ u3 q* S* s) q1 {9 x% m
) d* {, O# F C# S
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
6 p% K) O$ B+ _9 n8 C8 }/ S
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4