嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
+ L6 H* u8 z, x& R' ~0 K5 @
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
* [* |( X; ]+ l
# t5 q* W9 Q/ q2 A" s: `) n
这个头文件内容如下:
" ^) K) Z8 @8 g0 i' p$ t9 u
#ifndef QTCONCURRENT_RUNBASE_H
2 Y2 p/ A3 ?9 V2 f
#define QTCONCURRENT_RUNBASE_H
2 U/ j& I+ f' n j2 A, F5 s
8 x0 l$ A* g% @3 ~+ u ^
#include <QtCore/qglobal.h>
4 S3 I3 ]) p# f
/ k# k% ]$ u2 Q% i/ \
#ifndef QT_NO_CONCURRENT
& J/ e/ L/ M8 O; W7 y L6 }
2 N2 J1 `9 @) k/ m# U: W; F2 P
#include <QtCore/qfuture.h>
6 d' ^8 K' f4 |/ h* G9 l' k
#include <QtCore/qrunnable.h>
( a% ~2 z' L- S- D! V7 t
#include <QtCore/qthreadpool.h>
; Y( Q) h/ n+ z+ _ V& u
7 ~' V Y3 j$ Z/ Z
QT_BEGIN_HEADER
" B* j8 z& J4 \2 t" e4 Q
QT_BEGIN_NAMESPACE
* }( ?, C- O3 W. `) Y. }6 Y
7 }; w+ B4 T1 V O) \
QT_MODULE(Core)
9 B7 C1 Q0 _/ y# e+ Q. f
& A2 `4 k7 B, ]% K3 W& @
#ifndef qdoc
0 O5 ?' b$ P8 m$ ^' r8 t3 A
# I' a! ]9 e% A8 Q) w
namespace QtConcurrent {
& i3 ~/ h- D* J& w) i; a2 `
- R% G: F* O# m; r
template <typename T>
1 o1 T6 i% q, w' C ?
struct SelectSpecialization
- N; l/ K, ]( l' Z
{
" F# U# l* d; o8 E: s
template <class Normal, class Void>
. `: }7 ~, N% Y/ D2 @# l! s: |
struct Type { typedef Normal type; };
3 }/ w) O0 @8 B/ y
};
0 L3 h7 E1 I _
* C2 P- o ~) a9 s7 n
template <>
; a4 U6 J# k$ P: a% {& j" s
struct SelectSpecialization<void>
: u/ M7 }* u2 f. M Q
{
$ k. ^2 [6 a% {' @
template <class Normal, class Void>
6 X& l7 a) b, n- P w3 q9 v% Z
struct Type { typedef Void type; };
K( ?/ B8 {; G" J. K( L' G& ?
};
2 {% j/ W. Z/ ]2 z9 b
% z: v5 y- o3 G, A! W
template <typename T>
, n) K: b" Z5 U4 q
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
& d) i, k% _9 ], _. C( J
{
9 {! U8 ^2 N4 n; \+ N1 b }
public:
2 p2 e, T* H' n) o% o% Q g4 N
QFuture<T> start()
4 N$ A/ K* L% k& s( |
{
! D) ?( \' I7 Z" n
this->setRunnable(this);
& g% h2 [8 `8 f$ C; |
this->reportStarted();
7 G8 c1 r3 ]' N
QFuture<T> future = this->future();
8 l1 [& a- N# S
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
: f4 ~8 u! y0 z# }( i ]2 X7 _
return future;
9 I) O1 N2 z2 I+ w
}
+ `% s& c4 Z% T
5 `8 A/ u) j4 z9 }7 S L
void run() {}
o, n) O; L+ P9 T% D- h8 E3 y
virtual void runFunctor() = 0;
" e0 O- @3 N; O
};
6 {5 Q) V: L9 b$ ^' h8 E% h- A
$ X2 b0 _5 e3 V5 Y7 z
template <typename T>
. l* b" x7 R7 H2 }- v3 ~# Y+ c
class RunFunctionTask : public RunFunctionTaskBase<T>
8 }* o, A* s+ N* ~
{
+ N; ~: I$ D, \! G
public:
7 G4 P/ H+ s& C
void run()
8 m4 a$ u9 g0 s' F. G. [( u
{
) u; L7 X$ s9 V7 U7 B" T2 s( G% ?4 |
if (this->isCanceled()) {
, e9 u6 x# y: K: K7 t9 ]) ^9 q
this->reportFinished();
* q6 }' u9 W; u' P6 F6 @
return;
- \& u7 v" s9 e
}
! b% W" D" @# v9 G
this->runFunctor();
+ ^0 I; t6 q1 g* `+ a
this->reportResult(result);
5 Y! i- V8 a4 g2 h! g8 v
this->reportFinished();
7 u/ }$ J( O; O2 c
}
7 g) O0 t" z6 y5 } q2 T0 T$ o
T result;
6 o2 y3 J3 ~, F/ w: i
};
" S6 k. G. n8 S9 k
% a% F- b: F _& b
template <>
# u: E0 |6 v* ]7 D2 d4 `$ G4 A
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
8 r3 p* _# [7 O4 n% l( G; I
{
, H0 R5 z$ u d; T. Q* `; q' n
public:
( t: z0 d' L* a- Z4 G
void run()
6 F0 S/ Q8 w3 w
{
( `) Q: j* [) R
if (this->isCanceled()) {
, A6 n. ~2 K2 U/ L
this->reportFinished();
2 [' `) q% M6 U! `) i/ i; N
return;
* X, N2 A; {$ j: ~
}
# x8 i _$ U) J1 Y0 p
this->runFunctor();
* m$ h" X2 }! Q1 H4 n) Z
this->reportFinished();
$ w; q% t9 h* `) M0 p; O# p% j
}
j/ Z6 u/ j8 U4 N# C7 D: F
};
, O v- p9 e$ L6 Q& j
, i$ @- O8 X! _4 e* w# ?- r# p
} //namespace QtConcurrent
2 K" Y) h5 ] S5 [3 n4 e I# P
$ V! x; u9 O. I. ]( d
#endif //qdoc
' s- t8 y: h& Z) i# P/ v. F% Y2 v
) Q- o. o1 J% {; ^
QT_END_NAMESPACE
: [, z4 P1 d( v/ M
QT_END_HEADER
6 J" ^' V! ^* ?
% W7 }+ C1 ]0 T) a/ ?( G: a
#endif // QT_NO_CONCURRENT
2 j2 j# i- d: A4 B, _
" p% b+ p+ b, [- x3 B2 P- R; s0 b
#endif
! M- Z; U. M2 `0 q
- ?( X$ e V) ?+ u) M* t% D! N4 q8 ?
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
: p* O4 ?. g6 [4 `8 C' G6 n* c3 f
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4