嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
( D4 M% J, _& q% p* E8 u: y1 W! ^
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
. H5 j- W% p% n$ h2 V, F7 L
* I' b. L9 s( S7 a+ E
这个头文件内容如下:
! ~& c6 {2 E* [. |# g2 x! J8 r
#ifndef QTCONCURRENT_RUNBASE_H
/ i) ~4 Q+ G5 T+ X2 U$ O
#define QTCONCURRENT_RUNBASE_H
. i, t" H, I/ B/ E; M) B
2 C1 g- a; M. d: Z( m5 r, p' @3 z
#include <QtCore/qglobal.h>
' i/ j. H6 F2 q# i4 n+ s
. |3 C5 {$ d9 N6 ]* |, [& @% q7 p
#ifndef QT_NO_CONCURRENT
1 r" m9 [6 o6 ]2 W- S) u
& B( @ D7 V9 G4 Q
#include <QtCore/qfuture.h>
. h k* q6 F/ _" q+ L) e
#include <QtCore/qrunnable.h>
$ K# Z1 ?& {% R
#include <QtCore/qthreadpool.h>
8 v. u5 F4 b* L0 G9 }1 b
: x+ ]4 h! h; j! [% q, J
QT_BEGIN_HEADER
2 f' k8 O- i- h k
QT_BEGIN_NAMESPACE
" i" p) _* g. b$ A
6 o2 m( n0 h4 I$ e& o. u
QT_MODULE(Core)
" g* w% w" J" s: @' G
9 C0 @' ^) X6 `/ o) O5 d
#ifndef qdoc
' `, j* @: x. @' p: `
6 h/ w9 W! v8 e& _4 K2 s; Z5 x
namespace QtConcurrent {
+ c- a4 ?8 L& p
* A8 |5 Z# U- _
template <typename T>
- S+ p z) X+ I8 K# i& n/ f
struct SelectSpecialization
5 ~/ L) x+ X3 n H& I
{
2 o% K/ [3 `; w9 Z) h0 G' J' S, I8 ^
template <class Normal, class Void>
, t5 s- O9 s: A0 N; l/ M& @
struct Type { typedef Normal type; };
4 }* ?6 f$ ~& l
};
) O# L+ D! `$ Q4 w! b- h" Y
8 m* W. P$ C% d0 u
template <>
, V" H8 m$ \, t2 B) @5 N% }
struct SelectSpecialization<void>
2 d2 g- j" ]6 V6 ~5 W
{
* ]/ n/ v$ C' d) e1 H
template <class Normal, class Void>
' |& v& m4 n/ j( R- q u
struct Type { typedef Void type; };
' X4 U. u& k5 b; m# U# S0 ~3 O
};
3 m3 U, X+ r* b2 Y
/ }' N) z4 ^7 y! M$ a$ u
template <typename T>
6 f5 l8 L- n$ w& {% v6 x' a( z
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
& t, K& Y( E- E0 d/ v
{
4 \) x' N' A5 C3 i. W
public:
- Z, i, A6 u8 B N/ [5 e% y
QFuture<T> start()
+ K- V& ?% ?, [+ R" t
{
8 K# C4 n; H, G% y4 A1 ?! t
this->setRunnable(this);
4 A# Z9 [) g/ A
this->reportStarted();
- ~7 ]+ D: |$ W' o
QFuture<T> future = this->future();
9 Y! e2 [) a& ]# R0 z k- J. E/ U
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
- I1 v, m! d2 W+ s) D/ M
return future;
! c, I& J8 [6 r
}
+ A' {. R% Y2 p, h& G( L. _' l
y) x N+ j' t$ f! @
void run() {}
) K8 b3 w: Q( T+ |9 |! `4 D4 i* s
virtual void runFunctor() = 0;
/ P) Q2 j" w5 g- d
};
7 J6 ], J* j) r# ~0 @( y) |
( u: Z& k" ~* V+ {% I4 _
template <typename T>
: P! S9 _2 S8 K# m
class RunFunctionTask : public RunFunctionTaskBase<T>
^- `: l; f; g/ x4 E! ~* R3 e2 h9 w
{
5 a3 r$ E0 h0 j+ M
public:
* e1 Z9 E- s3 n- w& P+ ?
void run()
' z6 Q/ N ^$ S' X2 v" T) P: s1 H
{
& C( F' i' `$ Z- i( y
if (this->isCanceled()) {
; t2 @+ j7 A* j
this->reportFinished();
# _) |% C" G0 M& j+ [2 r
return;
& T% q1 [: Y* G4 l
}
& C3 R8 `8 d3 }( C1 x
this->runFunctor();
5 o* }9 ]3 j) ]& N6 r. N
this->reportResult(result);
% n: G% _8 J" Q6 z, O
this->reportFinished();
- o$ L2 q! w& g, ]' ?7 I% k
}
+ z8 w e2 C( k. V
T result;
4 Q9 ^+ s, o; a Q" _: m
};
8 o. z# A8 L! `. A H# a* @
* n* M* r; I- x
template <>
- Z$ W# L0 T1 m
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
% |& }2 @' S+ I# f. F1 J( N
{
2 U' g2 w( Q$ q3 Z6 O7 c2 W% v
public:
! W. I G4 H f: ^ ]
void run()
7 O8 ?4 r8 ^" h+ S
{
; G3 t( a1 h. K9 u, [
if (this->isCanceled()) {
3 F; a2 a' N, y* h8 H8 O) H/ Q
this->reportFinished();
3 D1 k) ?& n& o- L# e% W( a
return;
. f! M/ g: o* j8 l
}
/ w: E" P4 h/ V" ?. S1 i
this->runFunctor();
1 k4 V' S" r. _: b1 s2 |6 o7 t
this->reportFinished();
* z ]1 U5 H( M5 k- l" ?
}
& r2 ]) _* o4 M& t7 m# R
};
' J9 b" W* W Q& m
" I. _/ K$ S, B
} //namespace QtConcurrent
5 h, i! e& |: B! d- ~
. U6 u6 N, S8 e" x
#endif //qdoc
# \9 x) Z4 e: A% m8 ]/ t q
- D3 [. B* T% ]* O, w" q
QT_END_NAMESPACE
7 `0 Y0 Z7 C. B. O# B
QT_END_HEADER
# m' U! p; J4 f4 ]7 V, e- T; J
- J0 d% N' w1 e
#endif // QT_NO_CONCURRENT
. x/ T+ l' @4 h X2 d" Y' {
6 f1 o s$ V" ?# o$ `) S
#endif
/ w; h+ }* @. K2 T N
- M# W" P6 s! S4 ^+ j
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
: y$ \: {& G/ R7 H+ P4 ~6 ?
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4