嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
\' e- l, K6 g, v2 h d
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
! O0 w7 R! o* _8 Y- _
4 O3 I" d% C+ w, K. C# A
这个头文件内容如下:
4 Z, G0 B9 I3 Q9 h! x% F
#ifndef QTCONCURRENT_RUNBASE_H
7 m4 k/ H" [# r/ ] `
#define QTCONCURRENT_RUNBASE_H
( z# @3 X$ F6 \7 d- ?6 W; F
$ l/ r6 v' t& @- D& {9 q2 p/ W
#include <QtCore/qglobal.h>
# p3 E- X2 T0 c7 x" u
- _9 C K' O( Q: K# C
#ifndef QT_NO_CONCURRENT
9 Y( g( U! P3 }
) h" P1 A* B! m) y
#include <QtCore/qfuture.h>
5 S: G) g) \& f+ Y
#include <QtCore/qrunnable.h>
3 ~" ]6 i5 p9 O0 [5 s! g
#include <QtCore/qthreadpool.h>
( R5 ?9 E# @/ }6 y# ]; ]' S4 ^' R7 p6 a
! U1 R& [2 D1 m& H6 F4 ~1 q% y* U( z
QT_BEGIN_HEADER
! G8 r1 B7 G; [" s K2 m. s4 Y
QT_BEGIN_NAMESPACE
5 O& K' h8 r+ H* _' |
& X7 c% G2 H! @7 {) l& x' `
QT_MODULE(Core)
6 ^5 ~" B. K" ?( s) ?9 y$ [3 I; f
! D' s2 m: @& w. Z
#ifndef qdoc
0 _( j! U; B& g9 Q1 v/ O- G
; z; c9 a# } t- g9 V+ d
namespace QtConcurrent {
% F" c# h5 }9 N; F! ?) \
8 D: N% a) ]/ Y% G6 y4 I
template <typename T>
; ?6 t( t+ Q2 n; l
struct SelectSpecialization
( u- t. c* g6 A% f
{
; b; y- N* X, j# e# ^/ b
template <class Normal, class Void>
2 i4 K6 L5 j* w+ c" t
struct Type { typedef Normal type; };
/ v. o6 ]3 Q, n- v
};
) X/ `. d5 x. D5 e: F
a2 h: J8 m) I6 p7 A7 N; R. q
template <>
& l# b9 [5 `* F! o8 f( @2 B
struct SelectSpecialization<void>
. ]5 D/ K8 u0 x! b. |; O3 R
{
+ [( Y; R1 z4 i
template <class Normal, class Void>
8 R( B4 p( H2 L6 s" x
struct Type { typedef Void type; };
( k: I( j; I$ J
};
3 t2 H! ~1 B' W0 c7 T: Z
! P s# c5 ]: q# l
template <typename T>
J: I7 B; L, J- }/ s
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
3 S% V# x; }* z$ W/ a
{
( [: k |# \; T- Q
public:
4 r) V5 A4 R0 J I1 F0 f
QFuture<T> start()
& M; d5 s( _; i4 Y
{
; p$ v& O: J4 `$ E
this->setRunnable(this);
' k0 y5 n) [% v
this->reportStarted();
5 S r- C: g9 ~3 _
QFuture<T> future = this->future();
6 ]4 @. f |# U( U+ n3 v0 c: d
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
1 ~# v2 z6 |- O6 a: Y! e
return future;
% ?1 b5 m: C$ i/ g: n* [
}
6 c! Y. l+ |2 l# m Q7 }/ `1 V; W8 ?
; B; m7 H7 X' }0 V4 F
void run() {}
3 P, D; \6 G3 s2 I# ^
virtual void runFunctor() = 0;
1 F" ]9 V3 X) z& n5 T' {$ {$ D
};
7 m6 `# N! f0 k5 }2 T( v! J3 K4 L
) _6 Z7 l* n! v
template <typename T>
; Y# {5 e* w7 I7 k& L4 c6 p- N
class RunFunctionTask : public RunFunctionTaskBase<T>
/ h' l6 m9 L7 T l1 ?" ?
{
2 M0 Q0 O) b. Y8 |! |
public:
3 Q& W4 F! Z( T) l
void run()
! m2 ^0 k8 x( v8 N) }( n
{
4 ?1 l$ m; c7 `" m( A
if (this->isCanceled()) {
8 h s6 e9 X1 e, a. J. _
this->reportFinished();
# A: {7 E" _0 v1 H$ u
return;
* A# `+ A( r) i/ q* s/ Y5 @
}
, D$ E2 C# \5 o3 V9 D4 ?% G1 v7 ]
this->runFunctor();
/ E: w2 V, T* l( F' G3 r
this->reportResult(result);
9 Q3 i, T0 j2 [/ y
this->reportFinished();
1 N. q0 B1 p$ G) J4 ]
}
. g; l9 x' w/ Y" q& [
T result;
- y7 l. j! y; ^, N
};
8 d8 E1 ^* y' W6 Z; \
$ t; B: p& n' ^# L
template <>
5 q% P6 r1 e" o( a
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
( p1 n0 D; `( ~
{
/ J8 N) S" ~! Z
public:
4 k7 {. I; z/ K
void run()
: u6 l' ^) ]2 ~7 R" a0 m) y
{
, C2 o. _. o! R. x9 b
if (this->isCanceled()) {
: V, w; j/ X" u4 T) j& a: h2 ]1 F
this->reportFinished();
3 g4 O9 a& t4 p
return;
% Q0 T- r2 B0 F+ A0 T
}
$ {& p2 I9 b$ T- Q( [; R
this->runFunctor();
( l( z/ d( i% l( U# B% h
this->reportFinished();
# i9 f/ W7 U7 G, C7 ~- C+ q
}
1 ~1 c; x: n+ N0 a: ~2 P2 J
};
0 E) Q, Z F& n" B2 m
% m+ `$ K7 Q7 ^9 j
} //namespace QtConcurrent
/ ^) {7 I% j( f) g
- O3 _( D" e# W, g% w* O1 N/ Y) {
#endif //qdoc
! B6 b! }3 z3 R
) ?* _- D- a! U2 @3 Z
QT_END_NAMESPACE
7 N* y! i: o& x1 T. @( Y* h5 o3 B4 O
QT_END_HEADER
3 @ y+ \0 N8 n- J# g
# V7 f+ l! r) S5 m. M7 @
#endif // QT_NO_CONCURRENT
* X2 A) u5 _% F( r3 [4 f% V, s, j
& f3 D9 }& _5 r0 W E: S! `
#endif
8 ]9 J9 l* X6 J8 s7 t) m5 b" o
1 O! c- B+ D( Y, M, J
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
/ J, H$ j5 i# k p4 A
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4