嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
5 U* C* {+ t$ i9 ^, r3 t& ^
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
9 G1 r. K4 j: @, q' b7 O" m- y# w
6 ^2 s5 e" T5 b4 Z- `) I5 q% j
这个头文件内容如下:
% B6 f# H% @9 p- i& J9 v
#ifndef QTCONCURRENT_RUNBASE_H
0 E0 O: R: a* g7 C. Y9 L# [
#define QTCONCURRENT_RUNBASE_H
: _: X; e% W0 ]6 q
7 _! x& C) P7 g7 D3 Z
#include <QtCore/qglobal.h>
: n2 x: J) }, N
4 ?1 ]6 N, k8 S' |% V6 ?" w
#ifndef QT_NO_CONCURRENT
8 E. ] ^( [" P5 N7 @/ I( R
: {6 `1 l; |9 V% l/ A! a! A
#include <QtCore/qfuture.h>
7 Z4 e; Q, u9 z) |) x
#include <QtCore/qrunnable.h>
) r( o6 _. x. J! w7 O
#include <QtCore/qthreadpool.h>
* w) {2 d! ^! t. q. S+ L
8 p1 m1 T0 _$ k) E5 a
QT_BEGIN_HEADER
( N& H- j8 Y0 i
QT_BEGIN_NAMESPACE
5 |/ n! T8 f. _: e, y3 |
3 x2 j: I3 w+ H. J6 B0 K5 \( T7 e6 G. U
QT_MODULE(Core)
- u2 k4 D2 O2 y, q1 `1 e
$ ~, f8 e/ [* r+ W& F
#ifndef qdoc
% X2 @7 Y' P9 d8 ?. H+ T: I, g- l o
, a6 f: u% v# r3 [0 z9 s" \
namespace QtConcurrent {
9 F4 K1 E$ ^) a. t8 Z( o6 ~
0 }7 N8 U# |: U3 E3 k( s& v6 Z' I
template <typename T>
+ b1 o2 ^9 E5 i+ r. X9 ?6 g. _
struct SelectSpecialization
0 f, a; L1 ~. C1 ^* b6 g0 ?
{
- _) K$ O5 j& u+ N
template <class Normal, class Void>
: \1 V$ G3 g6 g8 Q9 [- e! K. v
struct Type { typedef Normal type; };
! T8 b5 v" i' s9 M9 l3 S
};
/ _! F- Q% S: r4 ]! Q
" m U* j* A9 h2 ^. V% i6 @5 L& ^) u
template <>
5 J) g. X+ T0 [1 Y/ N
struct SelectSpecialization<void>
+ K b7 H/ D5 I# X) J
{
, O. Y& u0 f' Q9 g+ j
template <class Normal, class Void>
( `1 i4 I0 S6 V8 [1 H3 C- z
struct Type { typedef Void type; };
& F6 y; _* v0 H$ s/ r# w
};
( T4 e% x9 @) S
3 H+ K3 i( \" U9 n, }0 v
template <typename T>
3 P, x& C1 E" g$ G; i% F5 ]+ y
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
& ]8 z) s+ _3 J" i! {5 n! j
{
! N/ ?+ L( i! ]" n2 O: ?
public:
& Z' _" X, D0 o4 @( v" y4 }9 I
QFuture<T> start()
$ G$ ?. \. ^8 A& O0 f' K
{
# D; L' D d: W3 Q- p
this->setRunnable(this);
- o! _$ y, e& |1 v3 A
this->reportStarted();
0 X1 E2 p/ z1 x: |5 u/ ]
QFuture<T> future = this->future();
# V* J0 k1 T0 }- e
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
3 i4 P, ?* l' x$ L8 r% k0 F7 n
return future;
) K, i; H& a* Z
}
, N3 ]. B0 }- z$ [+ z4 K; e
% @) U4 @" l8 {. J: T
void run() {}
" K" j Z' Y3 t( g% _
virtual void runFunctor() = 0;
) q4 q: V. v4 r
};
6 w% }( [! D' A6 O8 z9 v
" b0 V5 u. s( x9 z9 O. R
template <typename T>
# f2 a8 ~0 I6 ?. @8 ?/ Y
class RunFunctionTask : public RunFunctionTaskBase<T>
2 Z: s, R O k" w$ {/ h, R( R0 A
{
& U' b8 [" A: F7 P- `+ h% {$ i
public:
3 ?% j, K2 ]; m4 Z1 m: h
void run()
2 [2 }0 @) [! h
{
8 n) N- `$ N. H9 t: A; t1 [# g
if (this->isCanceled()) {
% h; L; D2 j; V" j
this->reportFinished();
3 w9 Z8 K2 d3 H* l& m
return;
- r6 ]0 ?, O) U, J( w
}
- C# T. ]1 C( [! Y$ H- f* }+ t/ U
this->runFunctor();
" i& @! K& i7 _* v9 @. ]
this->reportResult(result);
4 l. n+ [0 S9 K+ R# I! y+ H
this->reportFinished();
9 }& O" {5 z" I, s
}
, |1 O b: n* p3 | m) N6 j
T result;
* Z2 f( U/ C1 ]+ {
};
+ ~1 k+ x3 Y9 o' [1 e
: I I+ c' L& w% R/ d" G
template <>
0 L6 D$ }9 Y g2 @
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
3 o5 K; ^! g1 e/ q/ T
{
" ?7 b x4 z( h' q$ G' h
public:
1 I' d7 _5 _% P. S3 L/ L8 |3 S
void run()
3 s- `0 T! ~$ D9 ~9 ?
{
& ~: E/ H/ m6 h
if (this->isCanceled()) {
% |/ p% E- J8 W0 i; C3 b
this->reportFinished();
$ A9 j' W' S* ~+ _
return;
( F6 v8 _% U$ f: q7 @) j
}
* k) K9 B; r# @% v. a% V
this->runFunctor();
# X; b% S1 L9 \) G; d- w
this->reportFinished();
) _7 @2 N2 v: h) i9 n( z
}
2 E' f- P8 G6 A. k$ o
};
+ x* ~! B8 A. B
' w4 S2 D7 p+ M8 B& h
} //namespace QtConcurrent
% @+ k7 k- x! p1 r
9 y- o) W" R& i& B
#endif //qdoc
0 G/ {% G6 h5 j8 }( f$ |
$ ?* _+ R9 a5 G r& i8 a. c
QT_END_NAMESPACE
: ~ S" b9 S/ k3 W! l: ~0 t5 C8 C
QT_END_HEADER
+ |6 e* `2 L9 f( K) P
) g; z& i7 G4 O! y1 K( R8 M2 t
#endif // QT_NO_CONCURRENT
. J1 D: H5 ?2 ]: E
0 x" }- z( s9 ?3 Y% [
#endif
" W. o3 B2 U% t: A' e5 H! F& K0 o
3 f! ~6 c0 n1 j
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
( N5 x9 J4 l) T; R# W+ {: ^
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4