嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
% v7 c9 k2 K8 y4 S7 O( N. J
/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: h" P2 X; t9 ~6 z3 f
, [: `) `# j5 O% H. S# P. q
这个头文件内容如下:
) m/ P2 D+ N0 ?, p# r! \4 b
#ifndef QTCONCURRENT_RUNBASE_H
+ @7 N- `" ^( {/ Z
#define QTCONCURRENT_RUNBASE_H
' _2 i( n3 N# s9 {
9 H5 e; `. p4 R- N5 Q
#include <QtCore/qglobal.h>
! G# b$ O( W( Q% b
4 L1 y$ D/ {& o
#ifndef QT_NO_CONCURRENT
# T0 f* W9 S7 n0 y+ B6 k
" }6 x0 H, H) P5 b( w) M
#include <QtCore/qfuture.h>
: d- r' n+ Q' }% ^3 T) i8 `
#include <QtCore/qrunnable.h>
+ R2 h4 o9 S$ ?( p' [
#include <QtCore/qthreadpool.h>
" K W8 \7 E) F2 P- e D, i! {
" ]+ }& O1 s7 y1 j
QT_BEGIN_HEADER
7 q$ g1 O7 z! B' R0 y; Z
QT_BEGIN_NAMESPACE
2 R0 z2 A" c! f4 H+ J
) { G2 J( O" X: W2 G. T6 N
QT_MODULE(Core)
5 d4 }2 j' ], P0 w1 r
: k! Q4 V. v( p% m8 @3 V
#ifndef qdoc
& h- I. F5 n! l. x$ {
3 r+ V6 I3 u) Z. J
namespace QtConcurrent {
# ?5 O$ T# F% [5 K# @
$ \' W0 [; ~2 m! a+ a8 Z, O
template <typename T>
/ u2 ]2 P5 D! p5 o; z4 m9 A& s7 E* s
struct SelectSpecialization
# w8 L$ ]$ U2 E6 m* F
{
4 _. |* P W+ q' ^
template <class Normal, class Void>
, m2 p6 E: X" r# T- s6 w
struct Type { typedef Normal type; };
# h. T. j# ^( V& R) Q) E
};
% l+ L2 B# T: V
/ c6 l& O+ L5 f% c( c
template <>
: _2 T0 |: ]& b, v8 q4 m
struct SelectSpecialization<void>
* Z( B8 x! }1 l' j
{
, y ~3 e( M: M
template <class Normal, class Void>
" G4 @) V8 }" |6 Y7 ~: t
struct Type { typedef Void type; };
" [2 f2 Z1 s4 b" V( x
};
; P% v- W. K0 q4 ]' X: e- q+ F( F
5 S& t+ S2 }5 J9 f
template <typename T>
! R0 q6 g1 P- s$ w) n
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
( m. N4 [; ~! _, j
{
& ?. D" M4 E4 Y, Q
public:
( C$ i+ E0 B9 s$ Y5 a
QFuture<T> start()
7 E2 y+ `$ B: S: ]% e
{
! S" K" X% O+ m, d( |4 V' I e: ?( Z
this->setRunnable(this);
/ k$ d1 F2 F/ z$ ~3 H. ^) V8 o
this->reportStarted();
7 X$ n+ @& X5 S" u, L# D: N
QFuture<T> future = this->future();
_2 p0 s+ E$ Z8 ^/ Z" c. x
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
! k: k3 W; s" |$ ?8 Y
return future;
. h; }5 f, e, A2 A. P
}
_) [( ^, K+ D6 N: L: ]' b3 b8 R
3 B W. [, C2 E* B; e% o
void run() {}
( F* R; P. o" U a4 H; C1 Z
virtual void runFunctor() = 0;
9 U$ S, N# k# }# {
};
2 h/ q! w D+ M. B0 S
/ z' @* @: Q. d4 y' _
template <typename T>
7 H% t. F( F' D- v: V4 z8 C" J
class RunFunctionTask : public RunFunctionTaskBase<T>
2 i' l+ |9 ~! P4 O0 x
{
& n: O. i3 p" \: L+ b7 \
public:
2 \% s* y% Z# O
void run()
6 y9 \- O2 M( a3 ?+ w) `" Y8 t3 a* B
{
* H! T2 u. d- @5 i4 J3 T% d9 d( `
if (this->isCanceled()) {
. C4 J# P# G3 `# }0 ?
this->reportFinished();
. { y1 `, h* ?* \! l
return;
$ |% X3 B& x5 a; e! R7 d
}
7 A5 }& y' r* s# t
this->runFunctor();
% b Q7 z# [# X* |5 H
this->reportResult(result);
( S+ h% \* k$ X0 r ?
this->reportFinished();
% O3 l2 Q$ H8 P/ R* B
}
`7 g' \, P( Q/ T2 W
T result;
- S) K0 p% E7 ~
};
( ]8 D9 H% o. |, b3 o+ m% s
9 w9 Q/ p0 t x5 E2 z5 G. h
template <>
" n7 c0 m3 K$ N7 x1 f
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
! S. t7 Z1 h- U! s% j
{
* l& Y x/ T% b
public:
$ C1 I, T, E' d; ~
void run()
- u, z3 ~* p1 Y( @$ Z! l- }7 m7 p
{
% z1 f8 @" W: f) }
if (this->isCanceled()) {
! e3 q' [' {) a
this->reportFinished();
5 `: D/ l& K& b% ~) Q, E% g% O; ^) A
return;
9 D# _8 j. {! q
}
6 e% D( ?+ U* R- [1 V& B& W2 y
this->runFunctor();
- _" N6 K' m4 h/ W6 a: \& z. S
this->reportFinished();
6 P+ M7 V$ O$ K/ d4 w# ?& [' Z
}
- ]+ L, n2 W' E
};
. y: ^: C6 o5 G6 R) ]9 u! h8 O3 H9 L
+ r m4 K# J) Y! y; h
} //namespace QtConcurrent
s9 {. F' M2 U9 R5 V
' i9 L8 Y4 M8 w2 x0 ]9 Y; J( ` t f
#endif //qdoc
1 K# a6 n: h% N2 u) R) C9 o
0 Q( P# T' j- y. a3 n0 B
QT_END_NAMESPACE
* V. N( K* C+ o- F2 \; w
QT_END_HEADER
/ `- _+ y. i' h! e, x
" e6 \# H+ g5 B7 t
#endif // QT_NO_CONCURRENT
H; M* B& [* r8 G/ t% D r, U
5 a# f5 _, c- Q. `) h$ ^: ]
#endif
+ g }% F% O6 s3 K
. J1 g" a9 m- f4 ]" a: K5 r
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
: v& J; O# Q$ h8 v% ?' v% y
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4