嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
: I( g. o) e n1 A" O8 n" V4 [
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
. ?8 g& s" z8 W5 \$ H
8 |, c3 ` I) w; X9 E- T: t* q
这个头文件内容如下:
' h' w0 S( {" M* F2 M
#ifndef QTCONCURRENT_RUNBASE_H
; [: T3 W$ ]7 E K
#define QTCONCURRENT_RUNBASE_H
9 G0 Q; X. M! t
" g4 N$ y% K& h3 U5 |* c
#include <QtCore/qglobal.h>
( V6 @9 t! z7 p7 P
. v5 a [' X" p9 m" d5 f& X
#ifndef QT_NO_CONCURRENT
- Q1 p# R( a+ j/ k
9 _$ O. O" \/ _! {7 z3 o3 c0 I
#include <QtCore/qfuture.h>
9 J0 P* L" u5 n& R$ r0 s" C C5 n" H
#include <QtCore/qrunnable.h>
8 H* I& }' b& `
#include <QtCore/qthreadpool.h>
+ V% y1 ~; A: O. n) \
% `& s/ }' E. e9 I. v( B' L. E
QT_BEGIN_HEADER
Q# G) Q' t" J7 M
QT_BEGIN_NAMESPACE
5 |: o' r$ g0 R/ r- |1 L$ d/ I
- ^8 `( ~- u# c* y" |+ j2 g5 a3 B! W
QT_MODULE(Core)
. k) _+ E" @+ X+ I3 c: F
% u4 U) [3 g3 b. Q( V( C
#ifndef qdoc
- b! x) d2 E1 u+ Y# o. K
( N' X1 w% s* H
namespace QtConcurrent {
9 |9 q6 e- }% R2 h
0 y0 @' W, `" O. u3 X: W
template <typename T>
% f" O& A H0 h3 ?7 V
struct SelectSpecialization
7 t2 } y) O, V3 n; n7 t
{
" `/ }: V8 x- a u+ e) S. H) I
template <class Normal, class Void>
9 I/ z) R+ ~/ V* Y1 N2 L Y
struct Type { typedef Normal type; };
5 _" Z# @; ~% H6 }
};
$ h1 G$ o; S( |9 G3 |3 x
& v8 H' {- x0 ?* s
template <>
, J! @, U9 L! d) s5 H
struct SelectSpecialization<void>
) _" g4 z% o' E: W& F& c ^
{
% |( V+ e5 K8 U- D0 ~; T. R
template <class Normal, class Void>
, o/ @8 {/ s7 L4 k9 Z) I
struct Type { typedef Void type; };
, K# r9 H* y9 o9 E1 v ~
};
' ~8 e$ {# G# N/ I* A7 s& f" a+ c; w) p
1 C1 K- j/ v) _. h# S
template <typename T>
" h+ r O+ j9 ?" G$ n
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
, S* L9 {( L4 N- C* l9 ~0 T ~2 F
{
2 B" ^: ~/ q. R
public:
; ^; i0 I8 k( t$ |0 q1 |. A
QFuture<T> start()
8 ]9 r* G) u" ~
{
9 d B1 f' x# `7 m
this->setRunnable(this);
+ C1 {, v2 u% t# J! t5 d
this->reportStarted();
8 C3 d; _" C- [. K* L
QFuture<T> future = this->future();
5 [- b# w+ m& ^4 V8 d
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
& u3 g$ |1 q' t; Z6 }1 ~* v
return future;
h& \" g: D+ \ M8 d3 y5 X
}
: i' o$ y9 ]1 k+ d
5 r7 {! K; Y7 o
void run() {}
+ p/ B& |+ A0 F! M0 J$ t
virtual void runFunctor() = 0;
. y7 |- j! M. r* j5 t: H
};
% E6 d9 E2 x/ W
& X4 _( ~" o- R6 h, Q
template <typename T>
4 D+ [1 D# I: Y2 \8 _1 D
class RunFunctionTask : public RunFunctionTaskBase<T>
* A5 t( t7 y% X5 n7 Y1 W
{
4 g4 `5 K! w& c+ b7 \
public:
2 ]+ }2 f! ?" ~$ \) s' f! B
void run()
8 G# q& H$ x4 R" b
{
& o; c# S+ F, @3 J9 G7 @
if (this->isCanceled()) {
6 P# m* u3 k3 ~6 g6 A! C' ]
this->reportFinished();
- O' a% z! c9 k/ ~' F
return;
, N3 D& t5 S5 \6 [
}
3 N8 ^% ?$ T2 S, m& |
this->runFunctor();
9 g7 n% R7 Y8 H4 ?
this->reportResult(result);
5 @& O" a- `9 K
this->reportFinished();
+ w7 ?; p3 d2 a3 I2 B
}
" G% A0 J& w. b2 U$ k h* a" ~
T result;
+ U4 d( `- h% L0 k6 [! O" |
};
' C1 x1 z7 k! |$ K+ o
z4 u: s- S" d9 `' j" t& r
template <>
( I5 Z+ L& J/ [, {1 S
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
6 _# Y" f6 {4 I# l& q: P3 M' y
{
, Z) h C* h& p0 [/ z
public:
$ [, b9 H) [( U& b
void run()
: l/ t. k. T" R# c0 O5 _
{
( h6 _/ e9 ~2 T: s& ~4 g8 _) R
if (this->isCanceled()) {
! C, U7 P2 H3 m
this->reportFinished();
6 p, c0 @; Y. I5 {& R. N
return;
* c5 Y% [5 `% V' |) S# m
}
/ r6 ?0 I. H8 a) j7 I# |
this->runFunctor();
5 ?* X2 |% o/ ]2 Z
this->reportFinished();
) ]1 f0 n7 z' H( q4 s/ b: ]
}
X6 k' S4 g! o1 y c' p
};
$ H% B1 @3 y' a$ O" Q j
6 A1 \! j, o# ^6 F, ]0 U& b
} //namespace QtConcurrent
% G% p3 P4 y% e% T/ l
/ @' _5 N1 T, ]! N* J
#endif //qdoc
" Y2 }9 H& Y, k) F
8 V: u5 K: m1 J% }& P& @) h% ^
QT_END_NAMESPACE
# H, l6 t8 O; k. j! F
QT_END_HEADER
7 C; l f* I, T+ i
) S s: T0 y# v
#endif // QT_NO_CONCURRENT
! `+ l6 \+ D, { w
" o# o* V' d% z& b. | P' w, X# ?
#endif
# g' c5 L5 b0 W6 r# O. w
6 ^8 B0 C' O& X/ x5 g+ \* D
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
$ ^# w1 b( B+ [# J6 l
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4