嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
( I" w8 d: m3 `! ~; ]9 c
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
% X. `9 s' n2 m! N( E2 r
9 E. s. ?* E% K& ^5 \" v, |
这个头文件内容如下:
) J# k. _6 S& L
#ifndef QTCONCURRENT_RUNBASE_H
# d) l) p3 z! Z% X( I }0 B
#define QTCONCURRENT_RUNBASE_H
& s$ i }/ I' l( ~/ H7 ]$ s9 `
$ y7 c/ g8 ]# L& J
#include <QtCore/qglobal.h>
6 k3 _* K& D* l
1 d" n, t! T7 H* w
#ifndef QT_NO_CONCURRENT
! s8 @! E5 g) h. k
+ F2 ^' p! R) \
#include <QtCore/qfuture.h>
/ I0 m4 I& Z2 o* J
#include <QtCore/qrunnable.h>
+ j$ E ^# c/ b: b! x: v
#include <QtCore/qthreadpool.h>
" V& f$ H9 Q) S' m
4 u+ E; U0 _( k; k& @
QT_BEGIN_HEADER
, q6 ?) ^3 Q5 V& w4 ^. o
QT_BEGIN_NAMESPACE
; ?2 w; f7 ]% m! I* q
6 j% F+ H% l2 E* r1 h3 V
QT_MODULE(Core)
: d+ v% ^9 e" g
0 K+ p1 {" ^4 Q: E
#ifndef qdoc
- ^ O; H- Q7 E% G
. }5 T& A* M! L+ O" |
namespace QtConcurrent {
+ ^, b9 H! y7 C$ l2 B
# U8 y/ J9 L: U }& s7 e& ^) J
template <typename T>
4 K: [ X7 M s$ C9 c" v* |+ }1 B
struct SelectSpecialization
% L' U2 y2 v# ~! Z7 c: q+ \
{
2 l3 t, Z9 a$ x& e9 Y1 I
template <class Normal, class Void>
+ [1 p# G2 e! E
struct Type { typedef Normal type; };
4 ^! J4 b8 A: F/ i/ }# O5 F
};
. A$ p2 L o' P2 ^6 A2 L9 K; J1 n" a
6 Z4 T$ A* ?, } F
template <>
4 @# B4 R( F% g& i+ l
struct SelectSpecialization<void>
' R! B5 Q0 Z% m2 b% j$ Q$ h. t5 Q, u
{
$ P4 L5 }: U: v
template <class Normal, class Void>
- K* h8 I, ?1 T0 l& _* W& q
struct Type { typedef Void type; };
! L' U5 T- [, S
};
4 u. @$ D; P$ U9 J) i! C* B
2 K1 m2 y3 {$ p- o% c
template <typename T>
7 H7 }( Y! L7 w* j7 b
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
/ ~5 \2 L D. g! C
{
) v8 p+ w: t* z$ b1 n1 ]) g% ^
public:
7 f; q3 o& M0 E4 l, U" o& m7 S, v
QFuture<T> start()
8 J, m; q9 P) [. A, l" w' g i
{
" K, e( q) L! d6 N+ X
this->setRunnable(this);
! H, o' j2 r `( |4 r$ K
this->reportStarted();
5 P" k1 ?; `4 Z$ q" t
QFuture<T> future = this->future();
; \9 i, h9 O8 X( [% P ?$ U
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
) Z6 V0 L8 w" F0 F; L
return future;
8 b5 U, U4 y: C3 v, U4 k
}
% A$ a* c* x& ]6 d, j2 `1 ?$ Z
0 j4 P5 B/ K2 ?/ l e; i" y5 ~
void run() {}
. \% o1 J; ~) `3 i
virtual void runFunctor() = 0;
: H; M6 J- F( u4 ?
};
1 S; ]2 n3 g7 n2 @3 c6 Q
4 J+ y B) b* T* Q, R; e
template <typename T>
" X7 C9 V4 r/ u# }
class RunFunctionTask : public RunFunctionTaskBase<T>
$ f4 g* `) b1 }8 J, f
{
& X/ E$ B% P0 k( O! q$ E6 i' V
public:
& T5 E* ^3 ]) G# ~+ f9 R6 T6 s
void run()
I- Z# M/ Y7 ?! @8 t
{
; q' K3 p4 d5 q4 y5 ]
if (this->isCanceled()) {
) c5 Z% R5 [2 W3 _, f: u2 [8 M8 N$ i
this->reportFinished();
% E |9 M- r) x) k9 c! Q R- m
return;
$ b' p2 x7 n. A. k$ F
}
; q- M+ q7 r- v" e7 p
this->runFunctor();
: P+ G/ n% q) g
this->reportResult(result);
e, ^" K/ n" T
this->reportFinished();
& X# G/ U$ v( H- Y U) O2 b
}
U/ Y, c; \1 c$ d) N& p
T result;
. P' x& D" d& ^ y) _) S( T
};
8 {+ d) f5 k. d5 m4 h- W* s
. L5 z8 A E5 h) o2 X" z
template <>
% F2 g5 g( n# S. ?. ~
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
* e( ]0 k. _ E
{
, N6 R9 F4 H0 ]' T5 O
public:
: p9 d- S) M3 a2 {2 B
void run()
0 B6 y; d) J5 }& T* ]3 l
{
8 K& H% f& I% f0 B! w+ a
if (this->isCanceled()) {
, G! a* P1 C6 f4 Y9 c8 `+ E1 {+ s
this->reportFinished();
2 @' d: v4 S6 p
return;
: N! q) I7 N* {
}
; z' l3 B; j: v3 f
this->runFunctor();
) {/ x2 q, ]7 i4 @" P; Y
this->reportFinished();
; r/ y4 \9 J% G# I
}
/ D3 Q# k$ z0 V0 X$ b1 m/ Z$ W# q
};
+ B4 r5 j: b3 |9 j! {8 F
. S5 ~5 ^$ O) M* E: R
} //namespace QtConcurrent
. F; h* r/ \! S
: }: n4 y4 ?, l/ a. B, h
#endif //qdoc
) t2 f# E9 M7 d$ l
; K- e% U! y1 c- \
QT_END_NAMESPACE
. V6 L1 |: |0 k7 {8 K
QT_END_HEADER
- `" N8 y% n! i% n8 x6 R \
* e4 a5 c& o& u( [0 K: j' L# v! o
#endif // QT_NO_CONCURRENT
7 e n& d: d% A, |
4 i* O( \0 O2 w
#endif
8 Q- W) J* s* t
& Z, i' w, ?0 C3 |
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
6 Q8 p v4 _8 L/ \# r& s. Z
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4