嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
3 L! P# _& E: j6 W" `2 y4 u
/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 j( M
+ O$ ~+ W2 C+ c- Z
这个头文件内容如下:
1 k6 Z! C: k$ d; |( K
#ifndef QTCONCURRENT_RUNBASE_H
' i% T, x/ i0 P$ m4 A" M
#define QTCONCURRENT_RUNBASE_H
8 Q/ B) L: k3 B1 E9 P
9 A5 b& P0 Z% k9 m' ~: Y2 N
#include <QtCore/qglobal.h>
! v5 M5 [2 Q f% b
8 z. e/ K- c' f! [/ w" {1 L
#ifndef QT_NO_CONCURRENT
( h5 ^/ e8 ~4 `+ Z( {6 A
8 w* y/ g) W5 u/ O$ u
#include <QtCore/qfuture.h>
' i, C! q W0 W! [
#include <QtCore/qrunnable.h>
4 ?/ R1 f) d- e; P% S
#include <QtCore/qthreadpool.h>
& K5 \5 x/ D5 y) d
! W( c. k. z: O- r' D# K2 V
QT_BEGIN_HEADER
0 x$ t' ?6 V# {% {3 s- [
QT_BEGIN_NAMESPACE
( i2 Q6 B" B8 B3 X/ I
0 G! o" o$ _ l9 I/ n! x
QT_MODULE(Core)
( Q. w% c# w+ m3 a" U
# K8 v8 \) y3 L- W K0 d
#ifndef qdoc
x5 E4 E' z& b; `- b/ M* P
& e" s8 p2 [. O
namespace QtConcurrent {
! f, Z8 W& s/ }9 F; m* w8 Q
$ n; ~% i/ u/ ?
template <typename T>
* I1 z( h1 D; Z" d1 d( ?1 K
struct SelectSpecialization
0 K* w7 m1 r9 s1 |# k
{
* u- M+ N7 Q2 Z* ^0 [7 U1 U
template <class Normal, class Void>
, ]' y' S, I/ Z7 j6 d9 y. ]
struct Type { typedef Normal type; };
/ O/ V; G+ \1 T& K
};
# ?& `# |3 a! @& g- p
# v# G' Q, p d, R
template <>
( U. W0 a y, C% A2 ]( K' I
struct SelectSpecialization<void>
6 ^9 t# b4 t' M2 h, H7 B
{
' b7 \6 u- `) i9 I w
template <class Normal, class Void>
2 M6 x2 J9 s- K1 ?: W1 Z
struct Type { typedef Void type; };
+ ]+ y/ a/ z' w R4 J1 Y2 s
};
+ ^. z- \) q& T5 E& [* Y0 j- J
% C8 M% z3 i3 \+ `% V- x3 ?5 ^. k, z
template <typename T>
, d% s, W" E r, f6 t
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
0 q4 y: U/ ~1 T: w
{
5 i" V3 n% [; x) Y! E2 j6 k# n
public:
2 X/ H& B6 T9 K: } w
QFuture<T> start()
: G6 z3 R1 t) r- w* \9 S
{
# R4 s, n% p4 `1 B' q
this->setRunnable(this);
) q5 O) u; |" _
this->reportStarted();
4 x* r" f+ k( g- t8 ?
QFuture<T> future = this->future();
c# ^2 U- A- G$ I. Q
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
, K' N, {7 |6 D9 n1 R
return future;
2 l" g- x* a! O5 k( P
}
. `! z0 c0 w6 h6 h) l% p i6 m
4 y7 B/ j8 \% T; J
void run() {}
i, K. ]" I c( Y. i9 l
virtual void runFunctor() = 0;
# } H% P* M* e# w) u/ k
};
6 O$ z. V' t+ @5 d
: o: g5 E9 f6 }1 w" E/ W
template <typename T>
( x5 j a, M( u* B/ [
class RunFunctionTask : public RunFunctionTaskBase<T>
* }" ]3 ]2 i6 x: i8 i7 Z5 V
{
' j4 V e* K- O4 s ?' y: X
public:
0 S; E' c1 T; i6 M! z. T! Y
void run()
1 l* L" z8 i, c" l0 ?9 q5 y
{
9 d. d/ j- w, R- q- N5 g% M
if (this->isCanceled()) {
5 I& A+ n8 ?4 y
this->reportFinished();
( g% |- I3 r& u3 u
return;
4 f' d+ j+ s9 ]0 P6 [: Q
}
# i$ M3 d) P9 e0 c& X" P8 h6 P* ?& @' ?
this->runFunctor();
8 O6 k' A( N+ y) O% v7 e# v
this->reportResult(result);
( C+ x7 a. R& Y1 K5 }6 d
this->reportFinished();
& t4 ]4 H( b# ]9 @3 t, C& d
}
' Q0 Y$ m+ P4 B" {& M) c
T result;
7 i, {+ X3 k! V3 Z: g" b; ^ b# E
};
* V# z9 V5 Z. }8 S- a
1 @4 i- h7 `5 k0 o, o$ H* i, t
template <>
" _* n% y0 `& g5 c: J
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
# V$ i5 v1 E1 A1 ~5 K& Q
{
+ N0 H) e# B' v# s1 e1 r
public:
. w" W+ ^' O( d1 g* A* m
void run()
( L- @7 {1 O' h2 q
{
0 B# |) `0 l' Z& f; D5 f0 g# Q7 u+ W
if (this->isCanceled()) {
" ]1 W' e$ y2 C/ B3 J# O
this->reportFinished();
! Z; x0 t# g% g- w s# M
return;
: S8 u! ?* e# b% ]( S0 Z! z6 k) E
}
# v, _& {5 @/ S
this->runFunctor();
9 a! r9 g' F' y. h8 N' T9 `
this->reportFinished();
" e; P e8 V( y& g2 `
}
+ C( m( F# @9 ~- F6 o& X
};
) d s! F! E' g1 `
( l# C! G' [7 |7 O2 m
} //namespace QtConcurrent
9 E' B3 T0 h* p. {# U# y, U+ L
+ Y4 ~7 F8 Q4 T/ i7 |
#endif //qdoc
' S; Q: v- p; L( a0 `8 {, L
% [" j9 `4 M5 U% |. {6 M9 H% x
QT_END_NAMESPACE
# u: M7 @- A# O& F6 y$ z2 [) b
QT_END_HEADER
# d2 y9 o/ X$ p9 o! u9 k
& G! h4 P& o# R0 @+ Q1 T
#endif // QT_NO_CONCURRENT
, [6 P7 D# q# r/ L$ {; E
5 e; J4 Q4 D! K: I( R4 o
#endif
6 h7 i/ l: g( d2 R. u
. z6 U7 P0 ?& B8 t
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
4 d; A5 v/ f! V- r3 ?; n
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4