嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
0 G6 g; C! Z* I d) d! c% 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'
' j( A1 E/ X* L6 w- u' r& _4 Q
9 k/ K5 h. A1 r" g
这个头文件内容如下:
$ _3 p' d3 i. \4 E3 {! z8 w3 [
#ifndef QTCONCURRENT_RUNBASE_H
6 `- o7 {2 D3 t( w3 `, _9 z
#define QTCONCURRENT_RUNBASE_H
& g% \. J6 `, G, P7 S x4 L
0 j3 l K$ a7 J8 J2 k6 p. J! |
#include <QtCore/qglobal.h>
x; s$ M$ [/ [7 e5 l B
) K( m- m9 q3 A! o% w7 m0 R
#ifndef QT_NO_CONCURRENT
9 w; w D+ C/ G6 c- ?$ U
( i* w! j3 N3 C3 e* G% C3 V
#include <QtCore/qfuture.h>
) H* O- Y8 M7 k) _4 @! h
#include <QtCore/qrunnable.h>
6 C. h9 F9 ~) c1 }8 C1 c) u5 [
#include <QtCore/qthreadpool.h>
4 L R# Y* N, Z8 r& [
* c9 q J- A# K" s! O t E
QT_BEGIN_HEADER
0 _; E" r# ^# {. B" x6 l- f# S
QT_BEGIN_NAMESPACE
1 A; O0 G( G5 W3 q7 T* r
) j2 v6 Y# s4 s' {8 l' s: K
QT_MODULE(Core)
% v/ l5 d" ~( I+ c; j
& l3 \7 B/ C3 R
#ifndef qdoc
n$ b/ b" W; A7 Q8 U
/ _ j; D3 ~& t/ ^2 x; Q; u
namespace QtConcurrent {
$ \; M- x% q- i2 D6 k( O
& i$ F! b. Q( L+ Y7 [& N7 `
template <typename T>
. R0 M; ]! C. E+ l3 M$ ]% n
struct SelectSpecialization
/ i1 {- c6 g( R/ D: ^/ b1 b- O
{
0 ?: o/ U- d8 ^$ ]/ w4 l' W
template <class Normal, class Void>
4 v/ G% W' G/ U6 b+ I
struct Type { typedef Normal type; };
1 j: ?9 {8 S0 W% D2 ~' B/ h8 Q
};
1 \' ^+ c2 V4 N3 \" k$ X }) v
4 Y0 c7 a- S( m5 ]/ O' U
template <>
# O# r8 U: |' X: A
struct SelectSpecialization<void>
2 S$ E0 D3 W! z' \: F4 G0 Q# C( D p
{
5 K6 F! N, c5 H' s
template <class Normal, class Void>
- |0 {8 e0 n% b( g# ~
struct Type { typedef Void type; };
/ y0 x$ n7 E9 q1 `2 j$ U7 l
};
J/ [ b- M. y6 \% W: A2 S. A. n1 C" Z
+ F4 Q6 b8 r. P; m5 O& t m
template <typename T>
* h' J" ^4 T- c8 G e
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
# ^' H, E9 [' N( f L! x* p% [
{
+ H& s q' d7 c L
public:
) X) b6 Z. @% G R$ |
QFuture<T> start()
3 F. t G# b# l' D' L) V
{
/ p* W5 d/ s% m
this->setRunnable(this);
( Q1 w( A4 K3 e) A8 Y# g& w
this->reportStarted();
4 }& t n. o8 H* [8 Y
QFuture<T> future = this->future();
* v9 Z2 c! R4 L, X' c: q# b
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
) ^/ j! j- b8 K: M a2 L2 ?
return future;
; f: r: T9 n3 Y9 A# u& }5 f4 R& J
}
$ z# V2 L% y. Q1 [4 S0 {
3 a# q, N* x7 |( R, d' U
void run() {}
6 [9 S& n7 d) [# S
virtual void runFunctor() = 0;
0 p6 b7 K1 i" @2 k4 J
};
9 r8 z. t6 B$ q/ O- |3 q+ R
% _" ~7 i& a( V+ ~7 v! t
template <typename T>
6 n6 m0 S( b. P" S" X5 m1 C7 C/ i: H
class RunFunctionTask : public RunFunctionTaskBase<T>
) z: S& j @7 b F8 {) }9 ~1 X2 G
{
! ^3 K, e9 r' G( ?! o, ~* C
public:
/ B8 l. F5 g5 g$ G& |
void run()
/ a. s4 b7 V, v) g4 L) Q
{
( m4 H7 b `1 ?' }! u1 N/ ~
if (this->isCanceled()) {
# _: W6 k" m5 G6 U' }9 l
this->reportFinished();
4 Z: R) s4 Z& Y2 x2 {# F9 U
return;
! _5 R3 s* r& o! |8 A/ U E
}
3 p- ]& ], ^) n- j
this->runFunctor();
' f' p5 U7 |+ V% Q! T" g) H
this->reportResult(result);
3 G7 ]2 ?1 B/ U, E% T7 W8 {
this->reportFinished();
0 D$ f# h, g6 |, _ i9 H
}
; k/ l. W5 D/ _$ A
T result;
/ l( `7 n% L9 N: P1 y' P4 l
};
$ h. S: ^5 u5 Q2 B7 Y* a
' j% ?2 }# s$ C) C8 J
template <>
, P- n6 A. `& F4 P" g0 K
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
6 V, J. u5 H r! b1 k
{
\9 o+ S8 v l5 r) Y
public:
: H; G* i$ o. T+ {+ Q
void run()
0 \9 X \; T( ]" B: R- l9 F/ e1 z. w/ k
{
/ B2 K+ [, a1 T' C
if (this->isCanceled()) {
: M0 I4 @" E0 F( @3 Y+ U9 C
this->reportFinished();
' g3 j' W' z4 m, o
return;
/ r+ p; P5 {: ?
}
, e& \) S7 Q# y j* h* e
this->runFunctor();
0 M" U0 \$ c0 E
this->reportFinished();
4 x1 P& l1 G P0 Q
}
! e- @& ]. ]/ I H8 e/ S
};
/ ^) @, A1 h0 H6 U/ D3 n
0 @$ ?! d8 d: z( e7 ~5 Q! n" Y3 ?
} //namespace QtConcurrent
. h4 q8 r2 d5 T" U; L+ s @
5 T1 @. i* ^/ v6 L: a2 Y+ H, J
#endif //qdoc
2 C9 ], l7 o" Z( D
' v3 l( W2 v! r0 @, D1 V
QT_END_NAMESPACE
7 [' r- l6 g" O0 N- N
QT_END_HEADER
# g/ D9 g0 k3 p5 j+ d$ d0 `
1 B1 d) x) }& k$ E' C( e9 I
#endif // QT_NO_CONCURRENT
' V' p# g% v: a( D1 C; {
8 R+ x$ k* y! ^' ~4 K5 e
#endif
/ ?0 n8 P" `& L( ~0 P) m; F
V3 R- e1 q7 u& j- q, R' |3 M
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
$ ^4 t8 ~# o3 W& Y5 |3 B t6 Q- P
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4