嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
. Z8 Q) V3 y( f
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
2 h% E, @3 r3 X/ q$ [7 b
0 j7 [) S3 T" A" N
这个头文件内容如下:
?, |( L2 I. | V
#ifndef QTCONCURRENT_RUNBASE_H
\, k! E( Z' y5 g$ o. \, h
#define QTCONCURRENT_RUNBASE_H
8 x7 Q* i( J, |, X& I0 t. |2 w4 C# C
) N" n3 \, ^# F/ d: s+ ~! L2 `
#include <QtCore/qglobal.h>
; D0 L6 S) v8 @% w
" O$ B4 G" ]/ r" ]: Z! N, U
#ifndef QT_NO_CONCURRENT
, O' n4 k4 L3 @% i
0 D5 H) c; G a/ }6 l4 R* y* C& \
#include <QtCore/qfuture.h>
7 |( O! R" R5 u$ r1 N# I0 Y
#include <QtCore/qrunnable.h>
. N, d3 h4 [9 k6 w- e
#include <QtCore/qthreadpool.h>
- X: E! h/ n) [5 V
3 Z- r% O0 o' [2 }; R3 J) ]4 Q
QT_BEGIN_HEADER
/ ], J: y$ `3 m' L4 Y/ W* D
QT_BEGIN_NAMESPACE
4 S; q: I' |/ ]5 J" R
/ F0 E9 ^ J n& V, e
QT_MODULE(Core)
( b N$ y( G1 u6 I1 O7 p% x) _
# ] o! d$ R9 H0 ]* `( A1 g
#ifndef qdoc
1 V* j4 Z: b- v* z3 g( `5 q
^2 P3 d: ?3 B8 H5 D
namespace QtConcurrent {
* a# I9 [3 ^$ {4 _& H& P4 n& ] x
6 J+ y2 D4 G+ _, n
template <typename T>
" Q$ V! I# G: g2 Y1 S
struct SelectSpecialization
4 t9 t0 i9 u- ~! P( d! |' [/ J
{
; d S; W0 X; t8 {2 N
template <class Normal, class Void>
& e# C( t) [/ A6 `+ j
struct Type { typedef Normal type; };
: G% J) z- f' J! V5 S3 W- T
};
# T! S8 O6 i) `4 f! S
/ |7 r/ R. W; s8 n" u7 |, D
template <>
# b7 ]* @: ^& R) [
struct SelectSpecialization<void>
( \" ? k* x( l% U5 H- V
{
; x. V' I, O0 B4 d$ q) S
template <class Normal, class Void>
6 j% c. J! k0 A6 Z3 R3 O7 n
struct Type { typedef Void type; };
& T- L4 A6 o% \8 \, T/ H" G
};
4 ]% s, D, o: E" b7 S& a
3 {. c) n( {) r8 `9 R+ O
template <typename T>
6 |7 s* @, x7 d+ O
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
/ I( D4 G- q1 r* p: C0 k; Y% p
{
- w. d: S+ s/ a8 | p }' e
public:
2 ]- L3 \( j8 q- c* Q0 D
QFuture<T> start()
* P' ~$ q* u- W2 i& j( b; p
{
& x# c4 |: J2 A% m3 \: ~$ I$ o
this->setRunnable(this);
7 D& t$ P7 G$ D) c% Q
this->reportStarted();
% B7 `! o u/ v: i
QFuture<T> future = this->future();
' C% S) _% \3 A
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
/ }# d6 t$ a" t5 x# T
return future;
1 [* ~) W* @5 \( e E
}
# h$ `# h I3 Y( N- F1 K2 R! r
" S3 q- D, ?( H# Y( ~
void run() {}
! g- p/ X2 F4 ]. [/ j
virtual void runFunctor() = 0;
) r" g' t7 U7 m9 _# H' U( @
};
2 l! c7 L- Z! d$ R% ~$ _8 Z5 i
4 Q1 c/ P9 y1 W1 s( d% N o+ ?
template <typename T>
) N' }3 i1 y! l: R) I
class RunFunctionTask : public RunFunctionTaskBase<T>
! C3 _3 M" v# s l1 C+ ]$ K7 S7 R
{
7 X0 }4 b1 n: o7 M [+ u
public:
6 ?3 ^: {! |7 Y* P
void run()
& s3 }( B3 }. L; n/ e/ e
{
" r& R6 x3 i2 r( j R
if (this->isCanceled()) {
5 w$ p8 i+ n1 D& y* a
this->reportFinished();
8 M+ p* s. q+ K: O& o- J1 F. _
return;
# t2 A. B9 v0 t; V" L3 m5 {
}
+ R. Y* \- F' `/ b$ C' D
this->runFunctor();
3 R7 z7 v/ b `0 c) R! h+ ]1 Q5 a
this->reportResult(result);
9 y4 p9 t' F$ ?! v
this->reportFinished();
1 {$ D5 p, ?! z
}
2 E* b# ?$ C4 I0 Q5 L" Q7 b% O
T result;
$ A2 q1 r$ f' M- A$ N7 f
};
0 o+ B s4 N- r$ W
, F$ d8 B6 d0 g6 n w8 u" q# O
template <>
% b" c1 X' ^: \
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
+ J0 q u3 E, Y. v" i
{
5 ~" ~" a. ~) V _4 |
public:
' p! d) ]$ Z% N$ m# D; w
void run()
6 M+ |% }+ ]2 o/ j, ^
{
, z2 t/ b; ^. Z7 ~' N. ?
if (this->isCanceled()) {
) E# f; B8 s* w
this->reportFinished();
' E/ a7 _" U+ H+ B6 Y% N1 V
return;
2 F8 S/ @3 @8 F/ Q4 ~7 M2 }9 R
}
. R* M6 T; D. T) _: H4 I
this->runFunctor();
0 ^8 o. V% W8 h/ D
this->reportFinished();
}6 `3 o7 L. \, O8 {# ~+ |/ D
}
) e/ M1 E9 ^4 {0 u3 u3 k
};
! U5 a/ _. u- V' F2 |
) }! y# y; b m. |1 O
} //namespace QtConcurrent
; h: G* A4 @6 u" `
2 z6 u+ u2 _7 ?! H# t
#endif //qdoc
B: S# _ u: H) F) _. W- V, `( N
" q j) r& C- r
QT_END_NAMESPACE
& x# P# w, c- U( L+ L E; k
QT_END_HEADER
@7 j0 Q: r/ J- k
2 W" i5 L3 c+ @6 Q
#endif // QT_NO_CONCURRENT
; U( I# L" R. ^, C; l
2 K; P1 @0 [" C s( \
#endif
% ~8 X% }! T# Q! I9 A
; \1 L, W& O& B
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
" M3 `- W* R! r) U* \
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4