嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
$ S$ \3 R% @7 x- F" v" v% z4 t4 ~
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
0 J% w7 ~3 E+ u& _2 [1 D Z9 ]
9 w6 c( o% {2 @( }1 t. _- a
这个头文件内容如下:
5 p/ d+ B. I6 ?1 T! |& \ N
#ifndef QTCONCURRENT_RUNBASE_H
0 Q9 D3 ?& v. J
#define QTCONCURRENT_RUNBASE_H
: N' T/ F& _! Q) v# g
. r0 p: H) H# A2 s
#include <QtCore/qglobal.h>
& v: z* I* |$ E! d9 i6 H8 p; R
. \4 j9 t2 ~$ j2 \
#ifndef QT_NO_CONCURRENT
# q9 r9 z% [# W1 `6 a1 Q6 d4 J) R \+ Y
# W8 H! {* E5 k! J* M+ k
#include <QtCore/qfuture.h>
0 M: m' W1 c3 n9 z4 o5 x! g
#include <QtCore/qrunnable.h>
) H& [( r5 {) c; c, w. w. t
#include <QtCore/qthreadpool.h>
% O, b. i( `0 T+ @
' Z x: E" P1 d" e4 u+ F4 `
QT_BEGIN_HEADER
! z) P- L2 `* u+ D4 j S& G- A
QT_BEGIN_NAMESPACE
* v- Y& b# [# Z7 n. i
' }: c& B- [' ?
QT_MODULE(Core)
& b: M8 {8 M- C- q8 R% s7 v
. E/ G7 K( \8 S8 [3 ]/ }1 t
#ifndef qdoc
% m/ y+ }3 c4 O) V! A0 |$ I" y, `
* U& m" w X! P/ K' o3 x
namespace QtConcurrent {
9 q' |' h$ R0 V, S6 r2 u
, Y# C1 g: T. C' z: C4 h; ~
template <typename T>
9 W: E' Z2 ?$ p# g( @0 b
struct SelectSpecialization
# ?% K! ~+ H, O
{
: e2 o: Y& r' u6 R. Q( B& E; g
template <class Normal, class Void>
, L7 z8 p1 @' [" K1 F
struct Type { typedef Normal type; };
: Z5 T9 \ X; C# S8 I
};
5 x% \0 J( T! ?; e' f
6 Y% M1 n1 s( Y- F
template <>
& t' n( Z# u( g! C
struct SelectSpecialization<void>
9 L# a/ s9 ?/ }3 D; ^, T+ D
{
8 S& `. n7 x& ^ e' V
template <class Normal, class Void>
5 [, W! V; e$ E
struct Type { typedef Void type; };
; W& l9 l. \) D1 ]; N
};
0 M+ M( ]. U. z& i; M. v0 ]; C. ?
" k4 s5 ^: S1 m9 h
template <typename T>
' K" O( ?6 i, `; j; @' K5 }
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
: m3 U# c" y7 N
{
" E$ I. ~ x/ t/ ^* A- S
public:
; V7 R( {* N4 _8 d( `' J- t
QFuture<T> start()
# v, ^1 J0 t0 D" X4 z& R
{
8 v5 G0 E1 J4 `" ^$ N
this->setRunnable(this);
2 B( l. F L3 p) {/ w
this->reportStarted();
! h0 r3 L3 R# G x
QFuture<T> future = this->future();
; m3 w) H5 L9 l% q3 y
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
5 |' R( c3 k$ n4 ~
return future;
/ b# L$ g, Z% g( ^
}
/ D+ C( \- h. P' a$ O4 k
, i! t: q0 t1 P1 |3 L/ G5 U2 c% S
void run() {}
/ a1 o1 A" g0 T% p, C" N Y) x
virtual void runFunctor() = 0;
7 R* M7 ]7 O* ^2 {6 l8 A; \' {
};
" ] j6 _* W( F U; b- L0 ]1 R
$ L3 @0 x# W9 g# F. x
template <typename T>
$ B. D4 C# ?2 O$ O, F1 Q& c
class RunFunctionTask : public RunFunctionTaskBase<T>
$ q# u3 k7 w! A; M1 r! A
{
) Z3 [# @) i# m/ I
public:
# Q' W( T' P8 d$ `+ `3 v# U
void run()
; E/ x; Q& ^: @; G1 b E
{
6 k$ }! ]# G. V
if (this->isCanceled()) {
" Y$ c9 |4 E4 v! B* g ^
this->reportFinished();
% C0 w, K2 D, K1 L; J
return;
' f) z1 M. I! s1 E; H3 X
}
' {) u7 x0 ]. y6 f0 H3 G& F
this->runFunctor();
# j) z$ G9 s. n. R0 M$ Q9 r$ l z. k
this->reportResult(result);
$ A- K2 H9 \ @5 x. s
this->reportFinished();
. c0 n+ e- J; h5 i* o
}
' ]1 E" c' d: a3 ]# W: E
T result;
7 M& {+ w6 d y. F& \' K
};
# Z1 _& ^% H; r/ a4 k
, u: ]9 P! [ [! J( E
template <>
. t. N( P5 l3 \
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
/ h5 E: |* n6 X/ o z8 X- _. @+ e" W
{
2 R1 I0 n& Y; x* a7 [
public:
! H' a0 g i+ }: t3 U1 ^
void run()
3 `0 _! z9 {# x7 ^2 q/ j
{
8 m7 n+ S: y/ x+ W
if (this->isCanceled()) {
5 K5 t t% @2 Y3 q' Q
this->reportFinished();
9 X2 K0 o8 @3 w& t7 d6 _% ]
return;
1 |8 L3 n6 W' C# w# x
}
) Y* i7 ^+ Y( O. [% b4 U7 }$ N7 r9 W
this->runFunctor();
$ ~) a; k, _$ K; t0 L& p4 B& y
this->reportFinished();
. z# u% S! v# f
}
5 z0 W8 F7 T" w) ?$ C9 {; _
};
3 n6 a) T3 I4 S* @0 w
0 _& w2 t: a+ u6 [! _1 m2 S" x9 Q' q
} //namespace QtConcurrent
" r; D+ q+ S5 v
; S! q5 ^4 ~$ C, w e* |
#endif //qdoc
& V5 s4 O1 D4 t1 A2 S( C j
" q5 M2 J0 {, T& {( [0 h
QT_END_NAMESPACE
1 P U# R$ W+ N& o' s4 W! A' e
QT_END_HEADER
9 h: A. J2 [- j
6 h) B' M9 J- g+ g2 q+ D
#endif // QT_NO_CONCURRENT
8 G) B: ~4 m5 G. n5 K3 l) u3 C
5 {: H* b# X( g" D! s$ x
#endif
4 m2 ]& N7 o2 D' [
6 C( }; ?. {6 r: }8 \8 H5 e" d
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
/ i3 t, L! P5 h) b5 ~+ _2 K$ R
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4