嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
! i4 z5 B5 O& O0 R* z( J0 a9 Q8 @
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
& k& c2 o3 o+ C. z* s6 u
, {6 h: Y ]+ @1 |0 p
这个头文件内容如下:
! L# B F' N, ?2 P
#ifndef QTCONCURRENT_RUNBASE_H
: ?/ [0 O2 J( a9 b
#define QTCONCURRENT_RUNBASE_H
9 [/ Y6 e& b5 V: [1 S6 k- n% r
, h/ N8 s. D- S$ D2 q/ o6 k$ S
#include <QtCore/qglobal.h>
" ], C" W1 q* D4 n( d- V0 ]
+ W4 k9 r9 w) j y% _
#ifndef QT_NO_CONCURRENT
8 ~' I$ k) u. y& d
, D. j% `9 R' }4 i7 ?& q
#include <QtCore/qfuture.h>
9 c- m0 [( Q6 \
#include <QtCore/qrunnable.h>
1 E0 _+ |- D; G. I* d
#include <QtCore/qthreadpool.h>
3 U0 \4 c) W n
. p I+ U( W: _! e( [" l D& M
QT_BEGIN_HEADER
6 w8 Z; U) G- ]$ Q, ^% {5 @* U
QT_BEGIN_NAMESPACE
& t' l# }" }6 s# o
& i. n Q$ R* f+ ~$ @
QT_MODULE(Core)
d3 j9 A% e2 d9 m1 r
8 q, p, C0 B+ n$ _! L5 X
#ifndef qdoc
$ E& Q% U8 Q9 ], @6 T5 `" C
( }0 c# L9 r7 z: C4 Y O: Z3 R
namespace QtConcurrent {
# X' `, S7 c% A0 _- O2 D
' n" i6 e" h9 ^. ]; U* v; R0 l
template <typename T>
1 }5 _ q2 a P& h% Z# B- o/ g/ h: Q) }
struct SelectSpecialization
. u# b4 g/ _6 G6 L S9 G
{
+ {& k8 b/ F }8 C% l
template <class Normal, class Void>
: i! u% O& N, S' h: h% j/ B1 ]
struct Type { typedef Normal type; };
% i9 i# r5 ?4 I
};
) u$ t2 @7 X4 F4 R# r; Y+ _4 q
. W% C* V, ^$ r
template <>
' W0 y. Q+ w+ P
struct SelectSpecialization<void>
, F! N' F d, ^# p& c
{
7 P+ S7 g$ e. ? @- F5 D
template <class Normal, class Void>
/ H1 k7 x. x: @2 ~
struct Type { typedef Void type; };
$ Q$ @% }, R$ [8 E4 S5 z* [6 |
};
% _$ i: P! x1 j; u
- ]: d9 G6 m. T2 z: Z0 T
template <typename T>
- V, p+ F2 u* P4 H2 x
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
, K9 C! d# L* @- D5 y
{
' t+ J& S: U9 `. E
public:
/ x& f& G, L2 f, \
QFuture<T> start()
" U- Q$ Z( x- s
{
/ C/ f! R4 |5 h$ m
this->setRunnable(this);
+ ]0 i8 O3 r0 F5 t; i
this->reportStarted();
/ t# h. |! W+ x& J6 U
QFuture<T> future = this->future();
: G; ?& k7 y% R
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
( C" b( a; f+ q% A
return future;
2 T) _" b! w8 N8 N$ {
}
- N3 A% B: d1 J
E- |4 d5 Z1 I) \; C
void run() {}
2 [( O3 w4 ]. w' A$ O& p
virtual void runFunctor() = 0;
! d& H# }* E. _$ u8 f
};
/ F) l4 D. G* q/ O( U
, o7 e/ r* p5 h1 r
template <typename T>
9 P) p4 b4 d6 }3 U6 n' P4 w
class RunFunctionTask : public RunFunctionTaskBase<T>
1 q* L ` Q+ `7 y7 _8 G4 }
{
* m7 G- ]0 g/ U7 o& G
public:
" ~; e8 t1 v3 B4 L, X
void run()
0 ^, s* q9 t! Z1 ~. k
{
" e/ X6 V$ J ?* q6 k
if (this->isCanceled()) {
; H5 Z, T1 O" p* Q
this->reportFinished();
4 l: @. I, U: {
return;
8 X3 S; w) V- q. G$ Z5 J
}
; V/ h: Y2 x! R1 _! b# U
this->runFunctor();
* c( |) c. Q! q& l
this->reportResult(result);
5 X4 k$ T" g- s9 @ n2 p8 L5 N$ w
this->reportFinished();
9 F. z" D. J) S# }; j
}
% G$ U/ n# B1 K6 z7 C. c
T result;
" o& f0 C J3 ]4 d7 B1 j
};
1 C3 Y( t+ U* ^& y& {, h; V
' t3 x0 z: H8 x9 D! W2 ^
template <>
) P5 L h, N Q' x
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
v# }4 h6 b. C& |: T# v
{
# i3 q. R( W) C4 F" _
public:
; |: R0 Q( H9 {# F
void run()
. `0 Z/ F7 D+ B( d
{
6 E* O2 u7 w: P: X7 ]8 q6 y4 C
if (this->isCanceled()) {
, V& U8 i) |: R
this->reportFinished();
0 I, F6 a9 F) @' O+ K) r
return;
; w3 I) f5 i5 @% x* z
}
2 R' K! A V6 l$ r( T6 G0 H
this->runFunctor();
- f! i$ }! N: K+ w$ l5 B
this->reportFinished();
, j) S9 h* \, p+ A, h9 u [2 y
}
; Z0 O) [% t& u3 u b
};
. f. j+ q( N6 J8 {5 y4 f
9 K! y- }- ~- q
} //namespace QtConcurrent
8 B* d! C6 @$ K' |9 ]$ Y
0 ~& [1 U8 h3 {; a2 e N' _2 A
#endif //qdoc
5 f* O3 u, y8 E* Z- Q% x Y, |4 k
]$ u9 t7 X* n. z V) @
QT_END_NAMESPACE
% G$ f) i4 m0 B8 ~! L @
QT_END_HEADER
; v5 z. X9 F! \) d
- w8 x# u$ j# J9 u( v
#endif // QT_NO_CONCURRENT
( A. E0 I5 S Q! N& v V$ Y
% A; ^4 R$ d7 R+ K5 \
#endif
! {/ e9 m+ J" N8 w& m; e
, X% n4 M6 L: E4 l! q3 e. d- S/ V
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
2 S2 p0 F$ `+ p- T, L9 A
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4