嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
, r: w! h) r2 K( O' q
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
4 |0 i$ a. G- q5 ?
4 R" N6 V" ~, ~
这个头文件内容如下:
$ h; D- N- y4 w6 q5 r8 ?- f6 X5 k
#ifndef QTCONCURRENT_RUNBASE_H
& N" b2 O# }% o
#define QTCONCURRENT_RUNBASE_H
, Y2 g8 e8 ]* I
6 y0 t2 g* v) J/ q
#include <QtCore/qglobal.h>
. v! ?, T* t; G/ u3 _9 h) x+ L
3 U. t7 ]' h% F: Z- ~
#ifndef QT_NO_CONCURRENT
+ r% y, g" h' G0 s
) ^9 E- {5 U N* i( f, }
#include <QtCore/qfuture.h>
) [; N1 ~$ Y' ^7 U
#include <QtCore/qrunnable.h>
- Q3 N- Z4 f& W0 `( Z0 L |
#include <QtCore/qthreadpool.h>
: G2 [9 m- H+ \* x# }/ P
/ U% H# t% G, D. o9 S7 G/ r1 q: G7 C A
QT_BEGIN_HEADER
8 E& R. G0 i- b v4 P' @% O
QT_BEGIN_NAMESPACE
9 F3 o+ x& ~7 r+ \) B
0 d) R4 u7 ?. p/ {1 o
QT_MODULE(Core)
1 n( P0 d& g& a- g" E
0 Z3 }* i: c6 `9 W
#ifndef qdoc
% g5 N! u3 u% b4 z
4 r7 Q3 N5 Y" Y. ?/ b& r1 L. B
namespace QtConcurrent {
5 Z2 L8 D0 a9 r" D
( ~) c9 d x2 m9 Q
template <typename T>
7 [7 G. O/ u% W
struct SelectSpecialization
9 ?, C. G+ v6 J' A- m: O. t7 j* ~
{
6 a; b9 ~1 l. Y& K- k" {1 G0 }
template <class Normal, class Void>
7 z8 z6 y6 h- R( A u% n- d u
struct Type { typedef Normal type; };
4 `! }9 _" z+ M, n p
};
$ m5 q( J. }0 x% C6 q+ C
) l& K* D2 a1 Q! m& B1 |
template <>
6 a- P8 S, [2 X7 d6 ~, j
struct SelectSpecialization<void>
# u X [2 U, j) } }$ J% n
{
) M* v* [9 x. x, f- t. T
template <class Normal, class Void>
( S* Q/ |' r+ ^$ U
struct Type { typedef Void type; };
" c4 B3 O9 A) h2 C- o% B
};
2 A0 G0 E5 d9 _: j
/ E" u) j& h# n2 |
template <typename T>
% H# B3 y9 H3 x% b% ]
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
. W" m' c% ? w) K5 C
{
- C6 Z8 }! [/ a, k) j4 v2 m
public:
! j- O: [4 P$ ]5 ^1 v2 b! o
QFuture<T> start()
9 t2 k! t/ f1 R/ o! ]
{
, c4 m# |2 ~* W0 Z9 x6 W
this->setRunnable(this);
0 D. Z( ]! x8 w/ g' h& p0 e
this->reportStarted();
- h+ k. l% [' v, N P
QFuture<T> future = this->future();
2 F/ C, b9 ~. R3 |2 ~. n& s" \
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
2 J7 ~7 X" g# j- \8 {, q
return future;
& t8 {6 @ u+ }$ w& L' _# S, T0 K I' F3 a
}
8 |, b3 |* c! P. V" d6 l9 l4 b9 R
# Z4 P8 H" L i7 b0 Y
void run() {}
6 F9 p; N' s' j5 _. A
virtual void runFunctor() = 0;
7 a3 f1 B1 \8 l$ e U; ~8 u
};
1 \2 x- f$ _& `" }
* w5 k- U0 g2 i6 }: Z7 \* K
template <typename T>
1 V7 d: y3 i8 C/ r! g
class RunFunctionTask : public RunFunctionTaskBase<T>
! F5 S1 O( U' F% {
{
^' P( @/ w2 Z# a
public:
) w2 h& S0 @, V$ m6 g
void run()
5 `$ T; U, X' q3 I1 d7 Y3 n+ h
{
$ }1 Y2 \# o. \- s
if (this->isCanceled()) {
2 B _! @# X& f' ^& c0 Q
this->reportFinished();
4 Z% c* k$ T( | P) L
return;
" L X( S8 i# q$ [. M) Y8 n
}
Q9 g! {3 D3 c: j# R+ ~9 r3 ~8 h
this->runFunctor();
4 {" {/ d2 [8 T6 N: |; L
this->reportResult(result);
) I& d$ P! B4 D. ^% Q
this->reportFinished();
# Z4 [3 k" ]& F6 u0 e. i
}
1 O% f3 U& H0 f: w' c
T result;
1 H+ B Y: V y: C) J( }! J* D
};
( `4 {) P; M) k6 K# S
4 R0 n: T- p. E3 _5 d5 F
template <>
& e+ o4 u; n! R6 C0 _' z
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
, r1 L! i& j1 T% G* H( l
{
$ U7 w+ ?' Y3 v/ ~ B. b: s+ E
public:
; Y$ P* C* Z5 g. a1 I) t
void run()
9 T0 X8 r& V& z* Y% W: F2 H( H9 o
{
0 o# j! K7 r; P
if (this->isCanceled()) {
0 ?1 i# S1 w3 H! [9 u; ~
this->reportFinished();
4 f* n/ ]! O" z+ P; m$ O' ?: [, V
return;
# b3 L+ S; P- S# \+ P8 B& c. e
}
. z) P- `/ x- H% P) U6 |9 z
this->runFunctor();
, F9 ?! i9 P) A8 x& \' H) a
this->reportFinished();
! ]" \0 Q2 d& `* D; ]9 F' E6 g
}
$ e" v# t! s( I% ]0 r* X+ V
};
5 ] U( ]( a* ]) A& a
. C2 y9 i+ ^4 K) w. D3 M
} //namespace QtConcurrent
/ m' W! b# r1 m' g' k! `: p
& d, g& y" x1 Q9 r' [
#endif //qdoc
) Q6 E! h4 d7 N) s+ Y3 ^
9 m4 r4 H/ H3 O* D
QT_END_NAMESPACE
! w7 n% y3 q* b& Y+ ~
QT_END_HEADER
- Q$ X, F) X+ x
" D) k; t- C- @* F$ {% L
#endif // QT_NO_CONCURRENT
^$ ~0 h$ ~5 X; r- r/ c
( g5 `% x" d5 U5 }+ E0 Q+ o9 `
#endif
3 i# z+ r! W/ q' T% b
6 y& P7 e L$ p" X3 E9 p! d
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
, G) ?2 t. I- F) N# j
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4