嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
, N7 k; z; F* o- J1 }; O
/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+ B' d0 V. e: N6 d& S
" }7 ]( m2 s* u5 w! a
这个头文件内容如下:
) B Z: r K& Q/ w: n) W
#ifndef QTCONCURRENT_RUNBASE_H
6 N9 S& N' `' x0 P
#define QTCONCURRENT_RUNBASE_H
3 t0 ] H; e; @6 p- }
/ m" l9 a2 T, l( d
#include <QtCore/qglobal.h>
y" p. [% v4 j/ t9 H- B( l8 Q
$ Q+ {+ M M2 j) d5 O2 W3 ^
#ifndef QT_NO_CONCURRENT
. V+ v1 Q3 v6 U# J0 ~
- ?3 K6 Z5 J# q* }
#include <QtCore/qfuture.h>
n! N$ Z. i4 w3 Z
#include <QtCore/qrunnable.h>
) k. V5 F) z' n9 E1 w
#include <QtCore/qthreadpool.h>
( O0 n8 }5 H0 _ K" a
* t7 x" M% }- Z5 Z5 r8 m
QT_BEGIN_HEADER
$ S" f! U) V3 M: c) Y$ Y7 V
QT_BEGIN_NAMESPACE
1 I' E- m4 ~: q* z+ b% Q
" E. R G8 R- y! t" l8 n
QT_MODULE(Core)
& u4 i/ O- v9 q0 s0 ?" l, e" |
% _# |1 T, }) r$ j
#ifndef qdoc
, s m8 o d2 a {% H9 r! c. R$ L
" _% Y, n( o' L4 I- o2 |+ d( c5 a3 v
namespace QtConcurrent {
4 j% M1 X' W2 ]4 u: k
! e" Y# h/ Z* c" }/ Z3 }; M
template <typename T>
' h S. k7 R. A. Z
struct SelectSpecialization
% E* |0 I. j: h2 a; m7 r
{
0 X1 v$ l; x5 M# D
template <class Normal, class Void>
- V0 z5 v4 ]: `# r) ^
struct Type { typedef Normal type; };
4 f/ p X' z! g1 e5 C
};
+ Y6 E/ ?8 z9 R$ \$ H( j) h+ p
; Z0 X9 V3 J# \& }5 f \
template <>
; D y: k m4 R; J" k
struct SelectSpecialization<void>
! F" G, f+ i9 t% p
{
$ a/ f. N5 C% @ c, o4 z4 N4 k# D
template <class Normal, class Void>
. J1 e f. D' v! {
struct Type { typedef Void type; };
5 Z2 ~1 U" {( p5 C! y% O, ~
};
2 ?( M/ s7 A- [" @, ?
' V1 E S, I" w
template <typename T>
% w+ p0 |1 m- }) m4 L K! z
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
5 S( x8 a* i1 N" o) E% l
{
* |/ p0 T* m2 {: r
public:
" J: X# k% ~+ ]( `; K. t0 I
QFuture<T> start()
& Y3 g" O7 @1 A( x6 d
{
' X1 m) _2 {, T/ \- b8 B
this->setRunnable(this);
/ t6 @8 y n' X5 ~( E1 C! m
this->reportStarted();
) B. m% Q- c4 V8 k4 e2 W/ l) {
QFuture<T> future = this->future();
; L1 w- [1 r( ]9 f' G
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
0 F; C7 j5 U% }3 a% H/ Q5 @! P' Y: }' e
return future;
7 N# k1 g) Z/ x' ?2 `
}
+ A) w7 j# G3 w
9 g! e( U/ a! Z! Q, A: x
void run() {}
6 Q5 q% d' X% `+ j# k8 A
virtual void runFunctor() = 0;
2 O& i( j6 H5 G
};
9 d0 |% C7 c/ e5 B5 u/ s
6 w6 g! l/ r+ L
template <typename T>
, q$ A6 U- q# Z6 c' Z
class RunFunctionTask : public RunFunctionTaskBase<T>
) O8 \3 X2 a: b Q
{
T: V' w) m5 F
public:
+ A( R0 i, g0 s5 ~# e( e! m
void run()
6 a, s0 K- c0 ?8 g# D
{
5 H7 i3 v. {& l' V
if (this->isCanceled()) {
8 J d! z# t+ E- z# c
this->reportFinished();
0 {/ x/ K! p/ a6 b* V: Q8 [% @
return;
# [4 t* H' n$ t8 i* M! v5 U
}
$ B: y7 N% q$ `& `
this->runFunctor();
; w2 c+ Q6 D+ z+ F$ m% z5 I) T: `
this->reportResult(result);
' J2 Y7 ]' i; O0 g
this->reportFinished();
0 t* I6 J+ e: Y5 @ @& F+ O% W
}
* f; P Q9 T/ w* ^
T result;
& }0 Q3 L- y% C( D5 D% T% H# u
};
( c3 T0 U, E) B% E- G2 X, w6 K
- M( I3 T3 U: B
template <>
/ e Y4 U2 f2 |7 ?- e" L
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
+ t, q6 ~; b6 d
{
+ u, D3 P+ f/ Q( r: t- ~. ]+ `
public:
1 F9 A9 d; D, o1 q
void run()
& U! S6 j% `- Z) R/ w. |2 x
{
+ P9 P- W8 V+ s* a! S0 x7 o( q
if (this->isCanceled()) {
, |( S) W3 c: K6 w) A- |
this->reportFinished();
x5 b( G7 p' d1 @8 Y& @
return;
. ]; O3 Y- ]- h. |" {
}
; z$ f3 {$ `( M" T
this->runFunctor();
. q! I$ Q# |7 s# ?2 Q" S/ D
this->reportFinished();
1 K( z! z) o: ^+ Y
}
6 s% g6 N; X# C
};
5 ~$ d: Z7 [- d# Y3 o- @
8 \9 x2 }) E& b% e( L% {7 x
} //namespace QtConcurrent
/ Z! |, ]! k# L5 h. k
8 d; K) S0 [9 w5 v7 W* c
#endif //qdoc
* s% r& g& l$ J& y/ e( [8 t6 n, C
! Y0 V! n% {, @) b6 c, {
QT_END_NAMESPACE
* ?" M( a- u% q8 @ A2 e) Y
QT_END_HEADER
# {- N7 C9 C& `! h
) I" J1 j/ \6 t: T3 P% t9 Z# T
#endif // QT_NO_CONCURRENT
. |+ L' a- I) Z+ H2 P. D
" E+ ?1 g2 f) ^- S
#endif
5 `/ w9 K% R+ G# n, q7 y
/ f7 n0 [: S8 [& D
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
4 L4 V+ T' ~6 u4 s
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4