嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
7 _8 A% r# \& }! _# i2 I- H# S
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
. B; A8 P8 L: }+ g6 S
$ I9 g% }; _, U5 M* {1 n; b H7 N
这个头文件内容如下:
l0 m) `+ W Y7 Q" b" s
#ifndef QTCONCURRENT_RUNBASE_H
0 x9 C: Q: P2 t, [. J
#define QTCONCURRENT_RUNBASE_H
$ k @% |/ o. s* c) ~
- I. E. w, d9 U I3 e& U5 w3 \
#include <QtCore/qglobal.h>
! o$ @8 n3 x: y, u5 `8 K
4 b% l7 e$ D$ G/ w
#ifndef QT_NO_CONCURRENT
% i+ D; n1 V- b' @" y# e
% {( o( Z$ g9 P3 W
#include <QtCore/qfuture.h>
K: N5 }9 A5 c2 d ~9 m
#include <QtCore/qrunnable.h>
U0 F9 B8 Z. _6 ], l' o
#include <QtCore/qthreadpool.h>
+ m2 k! c+ l& T
+ N3 ^2 q! D2 E) L* Q
QT_BEGIN_HEADER
( u; x% K; Z" ]' O) q+ ?1 O
QT_BEGIN_NAMESPACE
" F( q- j" l# K" u4 A
' Q( F! |( {5 P6 P! T; N' t
QT_MODULE(Core)
! `; t2 \7 d& {" C( y$ L: _
+ }9 g+ Y+ h5 Y: P
#ifndef qdoc
/ l; B- p' d% V6 p
( m6 C8 M* ?4 V0 T! V
namespace QtConcurrent {
9 s. y" S3 Z$ e ]# H# t7 j3 z( A4 W
$ }/ A K6 r; F7 I8 Y0 k
template <typename T>
# o& w8 u5 U0 P/ q
struct SelectSpecialization
6 }9 ]' T4 j$ e, x! D+ f7 S
{
% S$ t1 X0 V' a! T
template <class Normal, class Void>
( p2 M5 v5 p( c1 X2 U2 `, V( s
struct Type { typedef Normal type; };
0 t9 O7 m$ _; {5 C7 _% Y
};
i( `: }4 y% ^) m* a0 V5 l- F
2 V% c V( b. M( h" F- `' V2 q8 J" w
template <>
) B2 p: G# x% B& {$ O0 n" c5 }% {7 y
struct SelectSpecialization<void>
" b x, @ Z: W, ~$ O! z1 M& C
{
9 Y/ C9 n' ~) m2 u$ B
template <class Normal, class Void>
7 X8 g7 }0 z4 x4 C
struct Type { typedef Void type; };
2 M0 s0 g* p/ y0 [
};
, c% D) y4 q/ K6 f' \
8 |, i. C: H+ m4 G
template <typename T>
. F' _! P; z9 P4 m" R$ u' k
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
- D) [. S- M+ ^( y8 I
{
7 C( J& c$ c; z
public:
: d# d- v2 a8 ?9 g X8 l
QFuture<T> start()
2 y7 K( E: w6 D
{
! B1 @. y& r: x( S, }/ x. K. ^) o
this->setRunnable(this);
7 K( Y# [; S3 S) g1 q A
this->reportStarted();
. R7 T- W$ A3 U% {- s
QFuture<T> future = this->future();
9 h9 i9 L' ^9 ]. }
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
* D# A6 t4 M$ b7 i1 a7 A
return future;
, f0 d* C* }; I: w; _9 e- |7 p
}
1 E* c9 \( u7 {; g
6 p# l2 R& Y3 J. [; T! G: i
void run() {}
, d* s \$ n" W; o2 b4 m
virtual void runFunctor() = 0;
% Y9 X. D: ^3 a9 W7 G$ R
};
4 v* u& N# ^0 `9 {& q
( j ^4 l% b& V" d0 }
template <typename T>
! n' K' p- _. R; M' O0 b
class RunFunctionTask : public RunFunctionTaskBase<T>
4 w( w' S2 Y+ }* g& N @( y
{
8 ^! H1 ~, x6 m5 U, m8 k- R" t4 g
public:
' }5 U3 t9 w+ R$ r
void run()
0 q; x0 G+ C. G, u- r- v
{
6 f# e: d# S( Y
if (this->isCanceled()) {
4 W0 f# C) ~+ Q5 V& ]% e- o) V' ~- A
this->reportFinished();
2 l7 T% p# b# T$ t
return;
3 L9 L. o; U1 ~9 s
}
4 Q; v; i+ c! i" ~
this->runFunctor();
- A4 U) e/ k5 b& e" f( u/ [2 U
this->reportResult(result);
4 E# _" \# d' g! ~/ A! J
this->reportFinished();
, y l# T9 V4 P% O0 j
}
/ Z) U# W* G2 a
T result;
1 _ |) q9 D8 i e$ D- F) e
};
( L! F. p* D" }6 Z0 q: s# T
9 f4 m1 Y" X% Y' m6 l3 P [8 r
template <>
, v1 [! |4 S# ]) q" |) a1 C
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
, g( s# L" H$ U! @
{
" s' S+ v r8 [+ u% ]9 g
public:
' R4 V" S( X% m# N
void run()
: Z" c8 X4 `" W L0 }; n K0 ?
{
. S: _# u+ o' L! u3 V* }
if (this->isCanceled()) {
' b7 t1 T) L5 A( v9 X
this->reportFinished();
. g! i: h X- C6 x- [, h" B, G
return;
3 V; `* ^! n& R3 f' v
}
& Q% Y' n% A2 p* C+ I( K6 x( v
this->runFunctor();
: d! _/ }3 e9 g" v" q* g
this->reportFinished();
! h- b" _4 B% }6 r! U5 x
}
2 D2 v( S% f' H1 [% s
};
% d7 A; o9 g+ e2 D1 n7 [
- F% x4 p* r+ n; m0 l4 u
} //namespace QtConcurrent
% i, X# D* c) p7 s( W6 l
1 q, Q8 d5 r! F! ?: ^2 e
#endif //qdoc
: U+ b( x; p! E, V3 O4 Z3 l
* h, \+ W9 R( r3 j0 l
QT_END_NAMESPACE
( W6 ^0 h' a0 q+ x
QT_END_HEADER
( k2 {" |8 {) e( G- d7 Z
+ ?2 E: E8 U/ o/ r6 g) Q$ A9 k2 X
#endif // QT_NO_CONCURRENT
% E' u* ?9 y5 _; @: R: w e& b
" c6 z7 s1 v+ |3 x$ D2 u
#endif
s T. y' a% p6 J/ B3 S+ o5 Z
6 O$ a% Z3 _3 N# y5 j
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
; z* y' ], ^. {& e9 T
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4