嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
8 E& n5 f: s8 c/ M% }9 h
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
( o! C$ t, U% \% F8 @/ x
) y8 D3 K0 K/ F
这个头文件内容如下:
j) P5 Z+ c4 n8 L) f# I
#ifndef QTCONCURRENT_RUNBASE_H
( B& C- D p& w1 x+ t- }) G
#define QTCONCURRENT_RUNBASE_H
/ V" y% C+ I6 {$ g2 T. f- B3 X
% h6 d3 d- v0 b" F& m2 V6 W
#include <QtCore/qglobal.h>
% K( Z" R/ E' y$ c( m- y! U
S6 t" v3 L& z( i2 W0 @7 E
#ifndef QT_NO_CONCURRENT
) H" C- r; J Z9 x; A* I& g
* V, P1 v1 u4 u! R3 L0 H4 J
#include <QtCore/qfuture.h>
' N* F' d- V+ n" U3 u6 U
#include <QtCore/qrunnable.h>
' X6 g& ]- X' G( G
#include <QtCore/qthreadpool.h>
6 ?8 u# t6 C9 C- ]: o/ p
- s3 m! F+ [; B2 `6 T+ |/ a
QT_BEGIN_HEADER
9 W) a1 l& y' Z) w
QT_BEGIN_NAMESPACE
6 s; o) E, A+ j% A) Y1 P* T. W
3 b% x# R" x) }
QT_MODULE(Core)
1 ^, f3 I5 ~9 q: `1 K( h
0 g6 h% Z; @, v" y* w
#ifndef qdoc
7 l( p7 F- A2 D; C
; m: y: L! u; u( t( f
namespace QtConcurrent {
5 i l; r, _( V, g3 G& W
2 x4 c- ^2 Z, _. h
template <typename T>
+ T2 y1 j% u8 L4 ^) R* ~
struct SelectSpecialization
; b: e# U, @. ?# ?( `, d( |
{
# H- h* Z0 |2 @- {5 p
template <class Normal, class Void>
2 B4 q5 J% z* z; B g
struct Type { typedef Normal type; };
; h' }% o# T% i. Q, D! F
};
6 Q: R2 E( Z+ k# W! [7 @% s
, g- O# C& T3 P m
template <>
, q6 M4 ~6 x; F/ w) G# z/ V5 B* Z
struct SelectSpecialization<void>
" x0 [8 u- H* j0 s! c
{
0 [( {% p; g8 e6 C2 O9 p
template <class Normal, class Void>
0 S( r( ^- T& s2 s3 z- b+ a
struct Type { typedef Void type; };
+ k! X6 w+ U7 w: D1 L. a
};
0 {- e+ ^) K- v& g, \) ^0 E- S; I F
$ f; y7 K2 h' m7 Y
template <typename T>
6 o0 f; @' I) q8 L9 B# N) T
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
! |" p y% R9 b* ^
{
b8 B8 g" i+ I" B% U( T7 X: N
public:
7 p0 O: M& A8 X+ x0 Y
QFuture<T> start()
7 Q* h% ?- z% W& W; c: K! R% S+ e- l
{
% a0 u0 v, c$ R/ F5 T
this->setRunnable(this);
4 V& }% |6 G( y; I6 h: o h. Y1 p
this->reportStarted();
6 l, b. u$ A0 l2 n0 Z4 l
QFuture<T> future = this->future();
: q$ n: b% d; N) X, H/ E
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
( P0 W' n6 x; ~. \' U6 N
return future;
% v, {9 S' i5 d
}
: @. d i( y6 [1 D; @) n, y
( Z3 Q2 D# k7 r1 C
void run() {}
y6 Z8 ?$ W0 x
virtual void runFunctor() = 0;
+ M- T9 e( c. w7 Q8 ?
};
6 h4 K6 i0 }2 g0 Z% F- A
8 Q- N$ b* o# G) M& Y# f7 h
template <typename T>
9 T' p$ ~( b; E
class RunFunctionTask : public RunFunctionTaskBase<T>
! m, N {! H+ D9 U* X6 F
{
6 ^5 l; y. e0 a/ w8 }$ ]. a0 Z0 ]) [
public:
( D" R: n$ y$ n6 ^; f
void run()
9 J2 Z" ?4 J1 A4 D5 B
{
! _$ C9 f+ ~. }
if (this->isCanceled()) {
6 @) ~3 g m- _( n; N( N# l3 [
this->reportFinished();
: p+ ?& r* I) u) E7 v
return;
, T- H8 ]/ j. f4 o- x/ R7 ^1 p! s
}
7 f5 ^7 ^0 s! ]2 X1 p) k" u
this->runFunctor();
9 Z( O$ n7 z R/ W% h$ V R( B
this->reportResult(result);
7 c! T L. B- h# n
this->reportFinished();
$ O) x) V* i$ l4 ?- z
}
1 e! a# E* [4 e0 b2 r2 ~
T result;
6 y* E0 L9 N' c5 B9 y
};
7 ^! ^5 l5 y& s( p; b
4 X* j8 P M [& [; [
template <>
) v, p+ Y m: w& t ^2 f% J+ v7 g3 @
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
. r7 W; X! u# I% z
{
* `3 S; T7 @ F; t$ v
public:
/ ^% |, q8 w: c. N* N0 v9 V- V
void run()
5 @* K) [5 h. i5 q( d
{
5 X) ?5 [1 i! [( M6 w
if (this->isCanceled()) {
3 O( Z2 r1 h1 v
this->reportFinished();
, G* n0 A! Y- {2 }
return;
, [- t* g. ?( [- t' L# Y* c( a# g9 Y
}
! O' N8 X- _6 R6 Q4 h
this->runFunctor();
% H" w4 S. N' M; c) O, I
this->reportFinished();
! V7 D, f; Q: l" _: f N2 g
}
6 ~8 a! X) @5 R1 }3 L( u# U7 X
};
V' Q- ^; I; B6 D4 M, P2 g4 ]
" y' P" F) X4 z8 D" W# P
} //namespace QtConcurrent
7 u, ?% [; j! r( Q& R
, Y' r5 t+ G: n7 l0 a8 `5 s
#endif //qdoc
1 {4 P) j+ c* x1 |3 @( l/ D; i
& D- n; j" R, Q
QT_END_NAMESPACE
4 h. O6 W. ]7 X; u; ~- J
QT_END_HEADER
9 O9 X! P5 F+ o$ k- b R
- J& c3 u0 W @0 V5 |
#endif // QT_NO_CONCURRENT
9 T a, x/ k% R/ y5 ~# K
0 i( O: G A3 H- ]
#endif
0 u" {6 J2 ]9 `/ x5 ^
- f! ^) E/ j1 {0 u7 l
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
( H+ N7 A) E4 e8 J
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4