嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
& O( v5 o% {* T( q E7 X2 m
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
# R5 D( P; L$ h. T# ?( _
5 G! y6 k7 Q, D, O
这个头文件内容如下:
- V# T* d8 @; A! \6 }
#ifndef QTCONCURRENT_RUNBASE_H
- C+ h3 t* M6 _- E& O- l( d- @! `
#define QTCONCURRENT_RUNBASE_H
% \9 I# g, o8 Y9 }. K
9 g0 J% u/ W5 _3 G. V
#include <QtCore/qglobal.h>
& g! ^& m1 [) J+ W
0 J: S& \$ @: u5 \( O4 N8 D) N
#ifndef QT_NO_CONCURRENT
2 q& z2 `% q5 l
1 O' W, X6 Y/ M' ^. k
#include <QtCore/qfuture.h>
2 q2 f" U& a s: {6 H' k5 r5 Z$ c
#include <QtCore/qrunnable.h>
" y! h+ t5 ]3 N: ~5 K ]
#include <QtCore/qthreadpool.h>
( D. U) q' J: `6 G( Q
# w4 z/ a1 y- A5 |2 T2 |
QT_BEGIN_HEADER
1 f; B1 j8 m" b! ~, b1 l$ P) G d
QT_BEGIN_NAMESPACE
7 P, e# O. c4 N5 C2 Z& X
, X5 @) i' \3 {8 c6 V+ f7 o
QT_MODULE(Core)
. P1 h$ ~4 a. n* W- c
( R- v8 j* ?' Q. i {/ B
#ifndef qdoc
7 Z2 ^) ]+ n0 F7 \: `
; d4 _8 Y: i; @$ T' L, P1 o; Q' T
namespace QtConcurrent {
0 R+ ~" G- H, L& ~; N
; X1 S. L& }+ ?, G" Z* w
template <typename T>
}+ P; X3 _, v
struct SelectSpecialization
; R* o0 j6 H" }4 P' h/ S
{
1 h9 S4 K9 I! K6 _0 c$ u
template <class Normal, class Void>
4 @$ z$ \' U& d' G! t
struct Type { typedef Normal type; };
8 J5 x2 J( Z) C! K7 d9 M
};
" b6 R3 R* G+ G- S+ p- G3 D; l4 R; E
% Q1 S/ e9 y5 f4 ?$ y) J; [; }
template <>
+ A0 k" x" D/ g/ p
struct SelectSpecialization<void>
+ z$ t* q% b5 j, W' ?5 ~
{
6 ?, b/ Q+ M9 {3 m3 v
template <class Normal, class Void>
: S- w7 e& Y7 ^, _
struct Type { typedef Void type; };
5 e, G3 r5 Y2 d7 f/ W
};
& ]0 L4 m4 |9 }' Y/ K$ K
; a! K& S" M( t7 A
template <typename T>
9 E m. X. O0 u* w4 F
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
! v7 O/ V& a& a
{
9 r8 e) d8 {' {, w+ C6 w8 S' K
public:
. b! `& f |! J* w
QFuture<T> start()
$ j: O/ x6 L/ U$ r) D
{
% y0 N* L- i7 K) o8 g
this->setRunnable(this);
4 r) }$ ?0 B+ k0 g$ @
this->reportStarted();
8 y) Y4 u" R: t( ~
QFuture<T> future = this->future();
' G' O" L9 O" q& y) M* u5 y
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
) L9 y' G% Q$ |# v
return future;
2 K1 u- W; N, `" {+ E
}
7 m# o: R3 i+ d/ t7 R- l
5 R6 F) J4 U* J# D
void run() {}
- `* x- i( ~1 S) p
virtual void runFunctor() = 0;
4 w) h4 j% c/ d" J# g1 L( h
};
z! A7 A: f, V$ ~, @# W
: } X. B/ O" [7 a& d2 C
template <typename T>
) y/ D W% x+ D
class RunFunctionTask : public RunFunctionTaskBase<T>
2 R! p6 q! ]5 l1 g# d1 L8 f+ w& F# g
{
7 c! I/ j" t8 C3 C/ d+ {) T
public:
0 s4 F1 N8 _: M1 Z/ ?1 L$ r9 D
void run()
6 s" a/ q5 y* T1 b4 Q4 l b
{
+ l V! ~4 H4 l6 @7 Q' q0 V
if (this->isCanceled()) {
% P: [7 }+ A, B% R
this->reportFinished();
; F2 o7 h0 l9 ^
return;
6 P' d; |( @- z/ t7 u! M; z; `9 K+ U$ t
}
8 A# g- g/ Y: \' }
this->runFunctor();
! W4 ?2 ^% K, e" l Y2 J4 a
this->reportResult(result);
* p, w p. e& G6 Q
this->reportFinished();
# g1 A1 A* A, z" ^, K/ {2 n
}
+ k w+ G" k- e6 q
T result;
& ~) B6 |3 j7 ]; ]" L9 W
};
. d+ ^ I9 ^0 n: |$ R
$ L. i+ r p) q: L+ }. P
template <>
* @ k4 P/ b* F
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
% R, K7 G5 x1 R" }" J0 G
{
: {+ U+ ~1 T; L! ?" k1 p
public:
) o% o2 S. F6 S0 v
void run()
O4 |" p+ V# m
{
8 K1 g& d5 P2 Y* q' {& }5 A3 t
if (this->isCanceled()) {
$ i5 b ~5 w6 |6 z" ?& V, E
this->reportFinished();
) b3 r6 p0 J% R
return;
) q4 r K. A% J9 N9 q+ s, j5 ?
}
& F P+ C( E H$ d- e) e9 k* d) X
this->runFunctor();
! p" Y" A% @( v
this->reportFinished();
/ n# C) e7 c3 e3 a+ m
}
2 I3 ~, U$ m1 p8 H# A6 v) ^
};
" U( G( z& O8 j
. ~8 l, n0 i8 p4 f. p
} //namespace QtConcurrent
5 \/ t) O7 w8 c" e' \
& j, b! E' ]- n, }( ~
#endif //qdoc
/ m) L1 O" L2 B6 l- U
6 C F4 h( \: R6 N6 Q7 ]
QT_END_NAMESPACE
3 O2 y9 x" C% k; d( K
QT_END_HEADER
+ \8 d I$ ~. M
8 w4 z9 e. p8 H% d3 L0 T- Z2 j* P; o
#endif // QT_NO_CONCURRENT
) ]" d: U$ E6 |1 k2 G/ e, C
3 K6 w% k5 a( R, Z5 t
#endif
% A- k+ u- b, T
1 f0 g# u" C2 ~' V7 b
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
1 d. d/ ?' W T Z
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4