嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
6 q9 |2 n. L; B( ?8 H# B/ m
/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 t) ]( j+ C: {9 C% n9 }! W# Q9 B
4 `6 S! X E! w) Y5 q( f5 ~
这个头文件内容如下:
5 V* s* A1 A) ?2 y) ?$ t w& v. i
#ifndef QTCONCURRENT_RUNBASE_H
; X- m N$ i; V; |7 S) ^2 k
#define QTCONCURRENT_RUNBASE_H
0 o" D3 z% J5 m3 h9 ?
" R8 I" J M: Q5 q0 M
#include <QtCore/qglobal.h>
( G" `1 p1 S) _, p8 {. s- n7 t' w. b9 P
1 Y; t1 M. C ^; e; I
#ifndef QT_NO_CONCURRENT
3 A6 h$ E: Q6 O: y; e( e
n; t: G* x2 N7 P" j; z% W! _
#include <QtCore/qfuture.h>
: z. r0 m' h2 a E- j7 t
#include <QtCore/qrunnable.h>
6 B4 K% z0 P8 ^5 p% x7 O
#include <QtCore/qthreadpool.h>
0 N2 _% ^, q% Q k5 W
" o; a/ i) [" L2 ^ Y. q9 H
QT_BEGIN_HEADER
: `! m+ C1 Z5 X- t5 {& |" T
QT_BEGIN_NAMESPACE
4 A8 m' i( c4 y& ]7 U8 m) @
, s& i% w+ g2 F$ @
QT_MODULE(Core)
( m0 _; [* E; x" D
7 F h8 E7 G7 j* _+ G! f
#ifndef qdoc
# a% K1 k: U, p1 w e1 n* \/ B+ a p
7 H* I/ Q$ B6 |0 m. L
namespace QtConcurrent {
8 V* v6 N; _5 Z$ \
: r4 x" b$ D) R1 [
template <typename T>
3 o$ z( ^. g7 N8 B. f8 Y
struct SelectSpecialization
: S. H6 @7 H. _* ^, g
{
( R8 \+ \( [) ?5 l" j q( v
template <class Normal, class Void>
. Z! x; h( E, o: |5 x* ]* M1 Z+ {
struct Type { typedef Normal type; };
& G% B9 r0 n. x9 T/ x
};
7 @/ ]; U* t) K5 w
. R% Y2 {, F! A8 S% k
template <>
$ `# S+ W8 e: }/ X- E
struct SelectSpecialization<void>
/ v3 O; d6 |4 ~. q9 y4 q4 \
{
0 g, y1 U9 e- \' n Y
template <class Normal, class Void>
5 e' ^& L- d- i; \
struct Type { typedef Void type; };
- j. g0 R8 k/ V! _& m
};
b: x" q, g4 ]! m4 ]
. Q6 P4 m2 k7 L Z
template <typename T>
* E! l. ^4 o) U0 `
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
1 z4 D8 b& F* J2 q
{
2 a4 [: R7 N/ \9 \
public:
; u: i2 _) q! @
QFuture<T> start()
5 D$ C* D6 M( j( R
{
9 L W* O. Y, V9 S2 P- E
this->setRunnable(this);
! y) Q6 e5 n4 t$ n7 z6 m
this->reportStarted();
% k$ n/ ?2 ~, }) A) S
QFuture<T> future = this->future();
6 Z: B, \8 y8 P" e: N. D3 d8 J. J
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
% F/ O( j- O" j: D* |( k
return future;
( N! c! Z3 @9 q$ d8 k6 s, Y
}
* w H( n0 N$ B
/ ~9 ?& {2 ^# _: x$ C
void run() {}
# s/ l% m2 I; q8 U/ i
virtual void runFunctor() = 0;
+ D! Y* @( N! j# F7 B" T0 M
};
; c" j/ B: C; S" @9 j' u7 \4 _
, P7 `9 D L! N) Q n+ Q3 E2 _
template <typename T>
+ s7 U$ G- D- ~( p1 d$ c
class RunFunctionTask : public RunFunctionTaskBase<T>
- S ~% w( L( P: J3 C* v
{
* g/ R. j. o/ I3 ~+ d* r' }# \
public:
& @7 D: N" T# P) j
void run()
3 W6 B8 Z! D) [ h
{
% L4 U. {! n, d( @9 C8 S
if (this->isCanceled()) {
5 A# s0 K5 }0 s0 t% Z$ ?, A
this->reportFinished();
1 y1 n3 d, e( |. V9 Y) H
return;
. M. B6 `+ I) |% b$ T
}
% q; B! m2 ^5 L) T
this->runFunctor();
, c6 V( } v4 l) J) h- }1 X
this->reportResult(result);
! @( E# _# y# |8 Z+ I# l
this->reportFinished();
& D9 ?. Q# W1 [! O) h2 ~2 }# t+ ^
}
4 E: S( E& p9 `/ T# a
T result;
& e7 a, P$ V$ f# c- W
};
6 ~9 T* n0 m1 `' E$ F
% T; f$ E a/ R: ]/ N' R: h
template <>
" o4 u+ T- U$ e" W$ t
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
; V; n4 q" o) G$ ~, H
{
7 w7 R6 B. Y, b6 I
public:
2 o; [9 }9 P2 g2 F [
void run()
/ R- w% X8 |0 P2 A+ A) R
{
9 U5 r7 X% y; J1 @: f3 X
if (this->isCanceled()) {
% N5 ~9 ^7 ?2 n" ]# d' q
this->reportFinished();
. o4 g8 I A$ q7 |4 L
return;
1 `; R6 I; p- E
}
1 j4 l! L3 W+ E, [) Q7 j# x! T5 q
this->runFunctor();
$ k! s% }0 n1 s* }
this->reportFinished();
% L9 b [1 X2 }( q% L A
}
" g: J( b6 M0 {8 `# v; s$ y; e
};
* K$ z/ w* I4 r3 B( i2 H | A8 h
8 t$ n2 Z; y# y3 f. L" s* l
} //namespace QtConcurrent
4 j5 F1 c3 L8 f; d1 V# A
' y/ T( j5 O* g8 S+ X) ^
#endif //qdoc
2 v( g% o( T5 _6 u& M w0 W7 v6 Y' P
5 Y D3 N) ^* f% ^( f5 x
QT_END_NAMESPACE
7 T6 |( }& u. y% S0 f
QT_END_HEADER
9 A/ `) S7 n5 q5 R# R# P
7 Z( U: k3 Y; U
#endif // QT_NO_CONCURRENT
7 Q! J% m( y% M a& h. _; m
( o2 B# w, {# L! k
#endif
9 d! w+ T/ p; E, H0 t1 W: P
' a( _0 E% g8 }' l0 r
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
" u+ o* N- G+ C6 R2 k8 ]. ~
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4