嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
# G3 K' a6 }- k. p
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
/ q$ J; d% Z6 _* d
/ f/ O3 t C8 d; _7 }
这个头文件内容如下:
6 u6 h4 u D2 h% m: I; g) u
#ifndef QTCONCURRENT_RUNBASE_H
! W( v U" c5 ^3 L N# F" Y2 d3 \9 y
#define QTCONCURRENT_RUNBASE_H
' Q6 {* H9 ?7 ^( [4 U! w- S
) Y0 U% |, k+ D2 p
#include <QtCore/qglobal.h>
' ]( ~- L- m3 U$ F( B# T5 ^
( K' L) i" Y, p6 z# r/ f9 p/ V v
#ifndef QT_NO_CONCURRENT
; `- j- _- m- ~; i/ P! o4 x
7 ?& _. ^3 h+ T* r. P; B
#include <QtCore/qfuture.h>
: o$ k6 H- s5 M7 A$ B
#include <QtCore/qrunnable.h>
% y) o, S3 n. t) U9 Q. k2 ~
#include <QtCore/qthreadpool.h>
4 [2 _6 d, m1 i' R5 Y
, @/ c3 M/ @; k
QT_BEGIN_HEADER
6 P6 G/ M3 T) U' J2 S2 w
QT_BEGIN_NAMESPACE
! c- v/ T8 g: N, d- e, y0 j H
- |4 w' P8 y% K9 G* {
QT_MODULE(Core)
@- t. v9 C! s7 D/ E8 z
+ s2 w) e: z5 K- O
#ifndef qdoc
) A; u& u! l1 i+ L) S2 d3 L$ Z
5 R) X; S' |( ?3 w; @3 |5 t
namespace QtConcurrent {
. g5 i( M8 _, [/ p* D! _+ Y' E4 ?% q
; V: y v- _$ E% j- X, p: u2 S3 v
template <typename T>
4 R: |: f1 r' F) |8 U/ ~
struct SelectSpecialization
/ |6 @6 [: |3 G
{
8 |6 e) b; e: j0 t3 N% b
template <class Normal, class Void>
/ ^; {3 u7 ~& w- I4 i+ |
struct Type { typedef Normal type; };
6 {; Q% X% G: e6 M
};
8 f0 r7 b/ h* N( D0 }
- c/ E7 W( P& [6 O/ F
template <>
1 p- w. Y5 K% E% [( [5 T0 k, s
struct SelectSpecialization<void>
. Y1 [% L* @( x8 H$ a3 m4 x9 j2 n
{
( _; g* y2 w# k
template <class Normal, class Void>
; v* z( k! ~9 G! c
struct Type { typedef Void type; };
5 [8 T5 b# \' p0 @9 H
};
; k, N# g( B- ~+ y$ i+ r
( u. K% X' r# W
template <typename T>
) f# b& u" [0 x# Z2 s* f
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
: s2 v9 T: C2 V8 z& [1 P
{
Q5 ?$ B$ `' B: Y
public:
! }; w8 _. ?" T, }5 {% A2 p5 b8 B
QFuture<T> start()
f2 B4 R4 g4 a! Z4 P+ j6 Q
{
4 X4 u6 C$ b: O& y3 d' V
this->setRunnable(this);
1 V7 d4 c8 q X: V& m
this->reportStarted();
3 Q8 [ q/ c8 b0 a# i5 g: m5 ~
QFuture<T> future = this->future();
! V' x" T3 o" }8 D7 _ @5 V
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
8 R2 @9 Y2 _/ A! _% Y. |# J* Z- n
return future;
7 ^4 A U: Q* a" G% a1 O
}
- o% L2 J1 H. x! B
2 h" q% j* O9 Y
void run() {}
! d" y( p0 U3 r( q3 l' C
virtual void runFunctor() = 0;
, ?' V3 E2 ~4 ~! q$ B5 |
};
! a# @$ M( X0 e
. m P9 W1 y- r$ G |7 B& p. U
template <typename T>
$ Q @( e; a8 J* a3 B
class RunFunctionTask : public RunFunctionTaskBase<T>
8 ?. u5 ^1 l1 U# |, t; v
{
+ i8 l* a6 i# F, R
public:
# [5 F0 z5 [7 m
void run()
' S* M* W% B1 Z7 s
{
, M. o4 M, V7 s, W
if (this->isCanceled()) {
6 F. D- C+ Z9 v- ?- x
this->reportFinished();
e; t1 T9 T1 n% y
return;
/ b( j! N) J7 Z1 G, E! \& }
}
3 |( @) A" Q9 q, ~
this->runFunctor();
! w! _+ [. B) A6 w; j2 X5 a' v
this->reportResult(result);
% L$ y8 K* V, X/ {5 H3 C, Q4 u
this->reportFinished();
! I) @* \' j( b/ L
}
9 U/ J( ^2 _; u* ]: y7 g9 w
T result;
& o* R7 a$ j& Z5 j% x
};
" `0 x o# P8 H& z$ L
" J8 E q* g5 ?: a
template <>
% ~/ B/ Y# @* a' H2 G0 l' ~
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
* h4 j" ]' k+ Z
{
8 J N& d3 z8 u) N& T; `
public:
+ n0 n3 M; W3 t1 l+ D
void run()
7 A" d7 f$ i+ }: D' C
{
' _& w* r& c8 }5 A
if (this->isCanceled()) {
v( ?. ^7 W: A8 o8 r. c
this->reportFinished();
2 T& A9 ~ N! s |0 G0 I
return;
+ z w( N& o, m/ f
}
' t# y" z6 c2 J
this->runFunctor();
+ H0 s1 n3 D' V5 B8 B3 w4 @6 j8 t
this->reportFinished();
3 e8 v1 X0 x' F( F+ I; ~
}
2 \. F: x' ]; B9 X' N, V3 O
};
: I) p& ? c9 n/ L E: t
1 E- x& y4 x, E9 ]
} //namespace QtConcurrent
, b( ]+ Y) U! x* a7 b$ R2 ] k
7 I& |7 {* A& t! j
#endif //qdoc
9 o0 M, U: G6 X3 w
( _% K9 d( b) @2 ]; ?2 Z( o% X
QT_END_NAMESPACE
b+ \6 R1 e" r) ?
QT_END_HEADER
3 L. u0 n& @$ v( y3 l% c0 [
: M' i. ^ F- K- H7 C( z' w
#endif // QT_NO_CONCURRENT
) O; c& O1 Q( K$ A5 X
0 T& J0 _8 w! ~9 {
#endif
* B( O+ n- e; b
L+ p2 |1 |2 ~2 K$ ? Z: z
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
5 _( j- H. l. k) z% w/ F
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4