嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
3 h* ? [0 P0 P: C8 `
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
+ p, W" F+ w& _% m1 F q0 B% a
8 q+ Y+ z$ g8 Y e; c, P
这个头文件内容如下:
- G- w' F, F; P8 S" I8 A
#ifndef QTCONCURRENT_RUNBASE_H
: G, r# C& [& e' d: X
#define QTCONCURRENT_RUNBASE_H
; u8 ^+ |, @) S8 o4 {& v
. ^' E& a3 k% W/ X, T4 h- G, H% Z
#include <QtCore/qglobal.h>
2 z7 |* c% p- _& f# G7 b
( @! P9 ] \& x0 P3 D
#ifndef QT_NO_CONCURRENT
7 d' K, A4 @' Z
+ p/ A+ j% k: o( P1 g
#include <QtCore/qfuture.h>
' o4 U) k$ y2 B! i# d7 i/ n! X
#include <QtCore/qrunnable.h>
7 [5 I6 N! e! D' K3 N, P7 @! k( p
#include <QtCore/qthreadpool.h>
8 u2 ~% B) ?2 E6 m- w# X
3 L" f5 ?: Z+ A1 t( F& q
QT_BEGIN_HEADER
9 p* H& M& _2 s( |( K- G& u
QT_BEGIN_NAMESPACE
9 A. D/ O6 j! N
; J! G2 j6 t& S4 I8 K1 F3 e
QT_MODULE(Core)
3 `" G$ q5 \! O- x I7 e; D' W# z
3 {5 h5 m/ E( f8 ]: G9 z
#ifndef qdoc
- B4 T' |2 G) _8 I' _
7 |! T9 i) M; s6 l5 [( Q, y
namespace QtConcurrent {
- v/ r' n- [( ]" a5 w% N7 `6 X
. E$ @% E4 m# X8 V) m* _7 D. a' `
template <typename T>
: _& C4 A4 \* O8 K8 P& M
struct SelectSpecialization
+ @% v# V6 v) c9 W5 I" U% D
{
" x- W( T6 `% [9 H) z c" ^
template <class Normal, class Void>
8 X: S9 d* e7 U( _+ y
struct Type { typedef Normal type; };
( r+ W' R9 s: }# R: [: r" i
};
. B# ~. L( b+ y" M/ ~& }* T9 u
5 M1 {4 w) a" K9 ^5 h U/ |
template <>
" U: t3 c* }0 B0 {: e; A& @1 o
struct SelectSpecialization<void>
9 D3 n& I |! P7 v
{
4 V1 Y0 ?8 A) {! x, k% }$ _
template <class Normal, class Void>
1 b% l7 c8 n/ V9 W$ a% _
struct Type { typedef Void type; };
$ J3 J( }/ c, w1 q: M% }6 J
};
( Y E; y/ B% V+ F6 O8 `
# K5 |; G. C4 ~/ ]; {
template <typename T>
4 p8 g( U+ `1 g$ O' C) C
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
( z3 A* [% U% G( z& V
{
. ^1 C: ?" ?: B: ^4 O6 l' v
public:
8 h+ h: g2 l* {+ h
QFuture<T> start()
" v& h, n. Z* q' `9 x, I' X) X
{
J" N. P3 ~7 u: D. M
this->setRunnable(this);
% U8 m, h) I0 {( n+ z
this->reportStarted();
* l5 y) a( V3 _2 d# W9 c1 N
QFuture<T> future = this->future();
% G( y* q: ~2 s
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
4 J/ G# D8 w3 G7 P7 U
return future;
: q& t. c; a5 q' w8 N9 ]8 p* d
}
9 y* ]+ {( d* w# D m" g, Z7 w4 r
% H) {5 p+ r$ v0 l4 r. F
void run() {}
6 e( U) L+ E6 X# {, Z
virtual void runFunctor() = 0;
& x6 Y5 e, i8 E7 ?
};
4 J5 W2 b7 _' \" }5 C
2 ]; R3 j' r1 r( U
template <typename T>
/ _+ ^# @8 x/ D; r/ m) u5 P9 j2 u
class RunFunctionTask : public RunFunctionTaskBase<T>
X' a/ l- N) [. o
{
* A7 A6 M+ a, \( d* |! w' f& M
public:
" i' i ^' ?0 N6 |, H, Q( p
void run()
' V% h4 k- F" M; Y
{
8 D; H9 t% B y( @9 {6 w
if (this->isCanceled()) {
( w: W7 D9 w" g* `4 h
this->reportFinished();
% B3 I7 [0 L% Z0 ]& Y. M# M
return;
2 g. I8 w) g/ z% @
}
2 J4 [- P1 B# \( x5 e* j; D% k
this->runFunctor();
7 O9 _4 o4 |0 {4 w3 l8 f" ?4 H0 H
this->reportResult(result);
) X d% l, D8 s$ k T
this->reportFinished();
6 K. b* b6 v: ^ Q+ x
}
6 {+ k. E, e# v) S0 c
T result;
( k' \7 |" j! g3 x, E- X" ~) `+ f5 D
};
" y% W/ j- p2 q1 W& T/ p* F
, M$ Z2 m: K9 s1 E2 {
template <>
# U( L: B7 @1 {5 k4 }: j1 f5 [
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
& b) P# L2 l- A
{
( C0 K# I* R u! d/ k
public:
3 ~" t' v, I0 X7 M' U% C* q( k
void run()
2 S' P( Y c' s* o2 C# _
{
7 P% Y! C$ W/ n9 U
if (this->isCanceled()) {
, H( D. w* m9 \. p# O4 X3 Q
this->reportFinished();
& I2 V% s0 O: e4 Y# v; e
return;
- S4 S+ i y7 t3 a
}
6 h0 Q! h0 |3 L& j8 t4 Z
this->runFunctor();
; f1 M& D8 c- c5 p# t
this->reportFinished();
" M9 X$ Y o4 p3 M+ D$ C
}
& Q* f- p( c- z7 w5 q' S- W
};
" z; [2 t1 I8 M
9 [, s2 s5 ~) Y! t
} //namespace QtConcurrent
1 h0 O5 g1 G1 j1 Q
1 W% y2 r; Y/ g, C' J
#endif //qdoc
# X9 R z3 v' T+ X
$ {$ g) i' @# U
QT_END_NAMESPACE
( I/ F; j. @6 R) n% c; f9 ?
QT_END_HEADER
& |. }% D+ I( S( e, C
1 E5 s8 y( u0 C$ w. P# u) Y
#endif // QT_NO_CONCURRENT
' @) z- N1 m2 C4 G1 v
3 w# y1 j* T# |$ d) Y
#endif
+ W0 w5 V3 ^" u4 _% {7 G, e
m3 n. {' S8 }+ m2 m4 S
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
8 c7 X' }; }7 N+ f
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4