嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
# H; |( R+ ^) r7 V6 T! ?# E
/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 z: ?0 b& x# }0 _: n- u
0 G: G5 @; O/ f# S7 u' m
这个头文件内容如下:
7 ?- E& `0 E# i: t) c7 [
#ifndef QTCONCURRENT_RUNBASE_H
* ^0 b; }+ D. K6 R# H( }
#define QTCONCURRENT_RUNBASE_H
& r3 C, Y7 [- U
, t1 n* I" q( k5 d; C. u5 y' d: @
#include <QtCore/qglobal.h>
3 @1 ]" i1 {& B: ~( s! k: j
, q4 c+ |1 r I% \' G
#ifndef QT_NO_CONCURRENT
- C( _% E4 N7 H$ F0 o
( k0 L' ^% t1 w% U3 G$ R' W$ z6 |
#include <QtCore/qfuture.h>
5 A3 t- z; g: K
#include <QtCore/qrunnable.h>
: L0 [( K/ r) T$ X
#include <QtCore/qthreadpool.h>
9 k& @; F- ?% Z: f! N6 _$ X" n/ J
K( y8 V2 ~! V* n
QT_BEGIN_HEADER
7 o- f& I' w. H; }- \3 m% \* ^
QT_BEGIN_NAMESPACE
9 X" W% A# j0 W7 q. y# S
0 P7 U' I! g, p$ o* r# I# e
QT_MODULE(Core)
4 G2 {3 O4 ^8 d" W
3 D- C# \( E5 [, H0 t' S. I4 n. y
#ifndef qdoc
% Z3 u* q# z9 Q" ^) h
2 d5 ^* Z5 t7 b3 |1 ?# H* n
namespace QtConcurrent {
! A3 G2 \6 `. F1 y {; K+ G
$ [0 J( J0 n( ?
template <typename T>
" j: {) \9 |- j, C; B% r2 q1 x; |6 `
struct SelectSpecialization
- ~- R/ b# k3 d6 G2 ~
{
- S1 |. g( O; g3 R6 L" j
template <class Normal, class Void>
. @" t8 D! O5 z3 G1 F6 g* y, A2 k
struct Type { typedef Normal type; };
6 h! d x" q. Y$ _; o% g8 O1 O6 g+ Q
};
* n& \- b+ H' b8 ^
' ~6 y) |$ Z' v! I" i
template <>
9 T4 L, k5 f' G: u0 p
struct SelectSpecialization<void>
& R9 i% l- F3 Q+ H9 t v4 L9 c3 c
{
: n+ |; V9 x$ {. n: T1 i+ `
template <class Normal, class Void>
G( g, E( e( j. E
struct Type { typedef Void type; };
% u* X4 k, F S2 M Z. q \
};
) M$ P$ R& e6 p4 ~
7 U! W* B, e" J
template <typename T>
: ~ K# i' h6 _" y- _0 m3 e
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
) v+ x; w& n, ?7 n# v9 ?, `; E0 r/ e
{
& T9 W5 z4 _0 o8 c
public:
$ W! f( i1 T( u+ t ^! e4 r
QFuture<T> start()
9 q2 [/ g H. c5 o
{
! [; n2 `6 Y0 w: N- D7 o4 U
this->setRunnable(this);
; E7 `% F* v* `6 |/ d
this->reportStarted();
7 J, o1 ?+ z6 q) r, Y) H
QFuture<T> future = this->future();
' ?/ ^& v) g0 j* i% t( {: G% _
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
2 J9 v7 k5 }9 B$ K/ l
return future;
: m6 P2 b1 }. }/ ?6 c. x$ A( ?
}
/ J' x& B" s9 [6 l
! X4 e0 r3 ` v. `& t( r
void run() {}
% r6 d" E3 {* A H8 e8 v) D
virtual void runFunctor() = 0;
2 |: d; ~. v/ z6 r
};
7 D5 H7 N8 f/ |+ A' ^
) [" c) W' a6 ~& c/ t- z2 y) U
template <typename T>
( D7 {# A" S* t7 r
class RunFunctionTask : public RunFunctionTaskBase<T>
5 B3 b9 Q z* Z
{
) e( O" Q+ N' [, I z; f
public:
/ {: n( r$ ?) S
void run()
$ V, d" T; L+ [
{
5 p: s7 H/ l; A$ v: w, G. q9 c
if (this->isCanceled()) {
% T9 w. l. a/ Y* {8 c4 B
this->reportFinished();
; T9 V* } x' i. u$ X
return;
4 N, q) T: z3 O' x: }
}
( t& M/ [. E6 l4 e
this->runFunctor();
5 x% [1 j2 [' F6 Y# N
this->reportResult(result);
* }3 V; @1 |0 P. b
this->reportFinished();
/ l3 y2 N6 |( @$ r8 V& b" s5 v$ N
}
( l! X9 i7 u/ L
T result;
0 @5 I4 }' Q4 r) f1 i: n
};
4 t% y: h* _; j. N1 {1 ]2 @6 U" `
9 D* {1 V8 B/ c) r
template <>
' {- y! X' p, L( w- v& \! r: r0 L
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
2 y1 c! W, |+ p% f; n1 h8 }+ p2 g
{
. N: E- I6 G- k: _) z+ P! I) z( H
public:
5 B, F9 E& J8 b+ f/ c. w
void run()
% {, G9 `: {& r
{
* J. ^$ q; _& A
if (this->isCanceled()) {
; z: O; P( k$ |' @0 @5 K1 Q0 v i
this->reportFinished();
0 d6 @3 ^1 x5 W1 C/ c& {8 h
return;
& F& u0 R4 a; g+ f) o7 D
}
: O$ J4 m2 I: g
this->runFunctor();
0 f5 L3 g9 ]; B: U: H- ], d5 e; U
this->reportFinished();
, G Y0 W' M! H$ T5 c+ J
}
2 f. U( e4 U/ ~( Y( I
};
: `8 b; M: x4 w1 v
! g5 w4 K/ S* v" Q9 H: X1 G
} //namespace QtConcurrent
# q8 [1 L# m2 V5 F
1 U9 v* U6 _2 O& ^% H
#endif //qdoc
& n+ {1 f7 A* x& {1 d4 L1 q# c
$ ^: V' P9 I5 |5 r
QT_END_NAMESPACE
% j" r5 S, D( Z- l$ S7 I4 x
QT_END_HEADER
$ F/ g* Q" C1 e; O% U/ |1 y- h0 p
; S( M# N- a$ L* w! _8 z" g
#endif // QT_NO_CONCURRENT
& \# N D Q$ g0 o7 M- Y
+ [6 B/ D3 L. q: i
#endif
! _5 f5 H( T9 F ]" J
* p4 t% @) D# `% q) L) _0 l
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
; A( R3 i1 B3 z( o x1 p# m3 |9 R) k
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4