嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
% C) @" C8 @8 G
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
2 Q9 C- G' Z" Z/ W7 W; S5 ^
3 a/ Y. K0 h, s( t3 G+ H' V
这个头文件内容如下:
. |8 g' M1 B% `
#ifndef QTCONCURRENT_RUNBASE_H
" Z- K$ K9 `# [; k2 l# y
#define QTCONCURRENT_RUNBASE_H
* D5 E0 z X/ Y8 Z( T$ K7 a# y
8 e, A8 F& c( R3 x0 a* F& B
#include <QtCore/qglobal.h>
4 [( X6 U! ?8 Z. e; z; b; D* x1 W
( b, F- P9 [$ S; m2 q
#ifndef QT_NO_CONCURRENT
9 N8 k+ q, ?( z6 R1 i/ z
. P* e! q( r; |4 [
#include <QtCore/qfuture.h>
' a+ v% u. s) _2 ]
#include <QtCore/qrunnable.h>
1 K) H9 \! m, F) s* |8 d4 |7 p7 j
#include <QtCore/qthreadpool.h>
7 ?! F/ W% U% V+ X& r0 C6 e7 M1 E) o
4 V+ m3 q* {3 O) N& ]
QT_BEGIN_HEADER
- T4 w5 S: y N3 K0 i
QT_BEGIN_NAMESPACE
0 N" G- T: T. R+ \/ V1 m6 E
7 p5 _2 ] A/ [; M$ N3 b) e
QT_MODULE(Core)
`8 z! G9 y! ?0 Y; J/ z; T
* E0 L# P: Y) n+ j# ~
#ifndef qdoc
6 ?! [0 e+ J! H N- |
# b: T: k% E+ P3 @: n/ }4 p0 e
namespace QtConcurrent {
: r% I& R5 d. o+ n* e3 j9 f
" a" q0 ~" s( S3 H1 F
template <typename T>
, {- v9 J/ A6 W1 H+ ], Y) Z$ Z
struct SelectSpecialization
& _9 E9 w8 U9 Q8 F' u% i7 ~/ n
{
8 [2 M9 y) W& I
template <class Normal, class Void>
' ^" U7 y' d$ ]5 B
struct Type { typedef Normal type; };
4 g8 _/ S- s7 y& u- \
};
; k5 O$ b! o+ \3 A8 D) Y
$ _" ^$ z7 I: P1 x, j0 n4 f4 Z, q* d
template <>
; C# o3 I" l/ E. ^: j, d! K
struct SelectSpecialization<void>
, @" z x e2 y+ [9 X% l
{
|$ R5 C. C7 t' g
template <class Normal, class Void>
! F& ~6 E4 j2 `* i
struct Type { typedef Void type; };
: _. l) t4 K1 g4 k4 a5 M7 U8 @
};
) [" x3 S4 X: [
2 o" P D7 m, Y6 b0 z7 U3 H/ _6 Q
template <typename T>
& P: D! o! U+ J. C8 {1 w# d
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
5 @9 B" L3 A5 X! f6 u5 A) A. {
{
P4 Z1 k/ e7 R" N2 L7 Y
public:
+ c- j$ `( e5 ~
QFuture<T> start()
0 @" O! `& F7 B( v2 l2 p5 _: N
{
/ G! d/ Z4 ]3 h( H! ?7 E- @
this->setRunnable(this);
4 u# n" G* S/ f
this->reportStarted();
0 |( V% [/ Q9 U2 A9 H7 z5 Q* w! e# w+ J6 d
QFuture<T> future = this->future();
! T; r$ O$ k4 P
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
" f; B& G. u) S. u* s& H' v
return future;
- ]- e% b/ H; _& ?5 ~, P% ~% g
}
2 K; i N) U) i# V z( p
0 l( r! X8 ]1 O& B p3 h- c; w
void run() {}
, N$ p9 U ^' f$ x$ ~0 M. ?
virtual void runFunctor() = 0;
0 x$ ^9 u B- q% H: F( `$ Z, p' ^
};
. n5 \# A+ J( e9 b
% F3 c/ H9 ]( ^5 m) [% G- M/ j5 v
template <typename T>
: X! t% W7 s6 \2 g
class RunFunctionTask : public RunFunctionTaskBase<T>
! ^1 e) v3 j. J; T) Q
{
% R, F" y' N9 Q' j. |
public:
3 g) B" z' _+ R2 y" g
void run()
5 G" C2 E/ R5 x% E! d
{
9 l7 i& ]7 ^. S5 q" ]
if (this->isCanceled()) {
+ u B( v" {; O7 k8 ^
this->reportFinished();
, k9 Q+ R6 D6 \: [
return;
& n, i6 @1 a5 _' L- i
}
$ h" N. a/ o! j/ G4 P+ k
this->runFunctor();
1 S5 g! A) E: M0 y; I. \
this->reportResult(result);
+ _! O8 @4 w ~6 k4 H
this->reportFinished();
5 g1 y! X$ e2 p% v2 W) D4 o
}
3 }% F3 A" l& c- b5 v6 z- g
T result;
' w% k1 g( Y* G, m% l5 l
};
% W" N; S$ e# S7 E
2 D# O. }3 l9 j0 y6 R$ C( `
template <>
$ Z% g' W3 V3 Q# R8 p- R
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
+ v: j- G2 s; K3 _$ f
{
4 a. h2 |7 j5 F& g
public:
$ }" F( b# l4 q& ?' j. [' Y. u+ F* _
void run()
: D) P, X) V# E5 h
{
3 | `$ F2 H2 A; Z" v: M- V
if (this->isCanceled()) {
( ]3 Z. j( `2 y$ G* x r
this->reportFinished();
9 w& S- R9 j% ]; y: @
return;
. u, X! C8 ?* N' q! w+ e
}
+ T5 P& [, l) Y* O% y7 v! e
this->runFunctor();
" ]" v0 V; H# R5 A& N7 I
this->reportFinished();
/ S! a7 h% T! _! ~- V ~7 E
}
9 j9 p$ }" W, m0 A9 P) g! x
};
/ ?8 V+ F, ]: ]/ v' |; L- [
+ |+ ~9 T5 k9 D- H6 B: n7 Z
} //namespace QtConcurrent
7 y, s" F0 x$ Z, H8 s9 Y& t w
( q" F2 P- }% c% k
#endif //qdoc
9 @) V2 w. P" e+ F% K; X
6 l0 [9 M& o1 Y
QT_END_NAMESPACE
3 h2 G3 U% u0 G( S( z
QT_END_HEADER
; W8 K; [6 h ], ]* D$ Q4 S9 y$ n& x
1 _ Z& p2 E. A4 `
#endif // QT_NO_CONCURRENT
/ c% m1 g- g/ a2 w' ~
- [8 @5 x$ h, {' H1 {* f
#endif
+ T6 D u, b/ m) f- d0 }: _8 Z
; _" b, R- P* G7 F3 T/ B, Y! s7 ?
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
1 l" }" a$ K/ _% O
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4