嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
' g0 N) z, E3 g) i: N7 _5 Z
/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 O) c$ F8 i2 J: D/ Z3 [
{$ a) Z3 Q" M2 V. B l( Y
这个头文件内容如下:
( R; E3 Q' W% I2 `
#ifndef QTCONCURRENT_RUNBASE_H
, z2 ?& E2 x. V+ a( y
#define QTCONCURRENT_RUNBASE_H
0 } N: T. s# y
* f, L$ T) }, w, h2 I( W( P0 z) C* Y
#include <QtCore/qglobal.h>
, q2 }; G3 l8 \+ B& y
! D8 @ @6 A8 x5 `9 b1 L p0 l
#ifndef QT_NO_CONCURRENT
3 u- k0 ~3 X3 B; T2 t2 M5 e6 _
) C. w4 Y9 f# q+ J& Y$ R0 m
#include <QtCore/qfuture.h>
4 ~3 v8 r0 W h5 S, \4 ^
#include <QtCore/qrunnable.h>
: o r. v7 k2 H* h* l+ `
#include <QtCore/qthreadpool.h>
! m' t: U% {6 {+ [
0 i8 N: Z: t& Y3 g- W* V. N
QT_BEGIN_HEADER
4 P: R# F' L z
QT_BEGIN_NAMESPACE
0 D% _1 r( T9 m- \( b, c* Y
/ L+ W$ y4 ~% y7 a: u
QT_MODULE(Core)
$ M! v: Y4 o2 `6 ~
" {& {& s/ |5 K7 C4 b8 r, @
#ifndef qdoc
! o. F& ^7 B* N9 w. t. C
) v0 B2 U# w: O: \
namespace QtConcurrent {
: v" E7 {3 k |
0 ?2 R5 m$ L; ^% N6 H7 {
template <typename T>
: A1 b3 O3 w0 e' @. @
struct SelectSpecialization
0 }6 H# N+ T7 O6 O) I, p
{
/ a; a4 P- e- s) A0 m2 _8 o0 x$ \
template <class Normal, class Void>
! n w* m7 A' l3 e) t
struct Type { typedef Normal type; };
/ V6 y/ F* w* D' D) k6 U; m
};
3 D" L' O4 u3 n$ d9 `
8 H! D0 h+ l$ z% K2 B+ I( j
template <>
) A" ?- r, m3 U6 ^6 \; d3 v
struct SelectSpecialization<void>
O( e3 _: i R. ]& S
{
0 I0 k3 L' u3 S( b( b# S0 I
template <class Normal, class Void>
& Z! r; g2 o& @9 F4 Y1 G8 w5 ~. R8 F
struct Type { typedef Void type; };
7 l7 \5 \+ {3 i" n
};
5 H+ s E( y. @2 N# z
1 {. @5 N# K7 z* M4 |1 U' L' y
template <typename T>
; j0 L0 J1 t- v' d
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
3 I Q5 X2 |+ a1 {6 X! ?3 s
{
. ~( s& l: L' e8 r
public:
m' v& m9 l- \0 o- v1 A
QFuture<T> start()
; v5 e" J5 A0 l5 J! Z" d) V
{
( r4 d+ r, x5 V5 I! \
this->setRunnable(this);
9 k) b# s7 X6 t' {2 \2 f/ K9 e+ a9 ]
this->reportStarted();
" I* z$ ?9 P5 a8 f }6 U m$ L
QFuture<T> future = this->future();
" }$ x: D8 W4 j$ T
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
, | U& L; i$ g" v# p
return future;
. [! g; P$ d& y. q
}
' Q: S% t+ C0 `; j o4 W1 T
) F+ @, B* R3 f. J5 U
void run() {}
% U) w2 ~" v4 V
virtual void runFunctor() = 0;
$ ?- D+ ?5 v E# b# t7 s: w
};
: O- Z y# N+ O' X) V& ]% d+ f
# U: q6 B" y" F. X+ P1 ]; v: z9 A7 C
template <typename T>
; [# I" D1 K) m: F* \% i
class RunFunctionTask : public RunFunctionTaskBase<T>
6 x, x7 u- [5 M4 M" o
{
) M6 y& \' G8 s2 q
public:
: L) A2 L9 x/ B, W' _9 i
void run()
* K, R) O" ^. l1 x2 F
{
1 j, s/ O/ V" _& B
if (this->isCanceled()) {
d( ^& L- @- G3 n
this->reportFinished();
5 M h& \& v/ V0 Y0 k8 W1 {
return;
% ?* v$ [2 J" c# I8 y; Y T
}
; c/ j, R8 E/ R3 d9 d' y" _ K! c
this->runFunctor();
' P8 g9 n9 h8 G. N
this->reportResult(result);
6 s% l5 O) f4 m# U
this->reportFinished();
0 b* M9 ~: K/ f+ ?: x1 A
}
) d& F, M4 W4 T" ]$ M \
T result;
4 r" M9 g% x+ Q0 ^- {
};
/ P4 A; c1 p9 ?
H) [. ` Q; F+ X% X
template <>
. d+ \8 i1 N. @, K0 L! t4 A1 D
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
/ l+ W) x( ?, ^7 U) o
{
& Q/ N' T# o9 h- J! L# @1 S" g* N
public:
# F# Y& I4 s- q5 J/ k9 h/ x
void run()
+ M6 G. z4 L- S' G
{
( S% v+ E) _ R4 V5 m1 ~
if (this->isCanceled()) {
. }# L" s7 K! t
this->reportFinished();
- C) f$ f/ ]8 x4 ^+ s& P% E/ F# C
return;
2 [" Y+ G, T( K. p
}
; }) U3 R I$ W
this->runFunctor();
x+ D; [1 J5 G( j+ V
this->reportFinished();
: x7 R) a4 e0 A4 _* S9 T
}
+ j Y* |0 w3 m2 S6 x
};
$ @! C8 ]+ M) W
& [" ?/ _( n, u8 B; O
} //namespace QtConcurrent
; a+ z5 Z; x' V. L
, M! d5 A" s5 m' D& s( K
#endif //qdoc
9 O% x; g' y) c, n! d& E4 m( R
2 s( V8 X' g) r$ d' v+ m. B+ H0 y, q
QT_END_NAMESPACE
; X6 [+ `) P, Y I" e( Q S
QT_END_HEADER
" p1 G' g6 ^ L8 k: {
9 ?" v" ?; [6 j: }6 N
#endif // QT_NO_CONCURRENT
9 Q# ?* b, X" T/ o7 c
, f7 y: h9 v2 y( }
#endif
! J& _8 J/ A. ]. \1 G3 s# B
! O# t+ R9 N; x+ W6 N
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
2 Y( b4 o9 i5 l d0 q' z$ Z
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4