嵌入式开发者社区
标题:
交叉编译问题,急
[打印本页]
作者:
smallknife_hb
时间:
2015-1-12 14:22
标题:
交叉编译问题,急
我对syslink进行交叉编译到arm,但是出现如下错误:
5 C) i f$ x7 ]
/home/tl/Projects/Xdl-build-arm/../../qt/Qt4.7/include/QtCore/qtconcurrentrunbase.h:65: error: two or more data types in declaration of 'parameter'
' @" {& f: b! i, T- T5 _
" M6 j( d! x- C# T ]7 E% W
这个头文件内容如下:
u! Z3 q. r' |6 P8 _. r4 x
#ifndef QTCONCURRENT_RUNBASE_H
9 Y' Z1 c* s" q; `0 }
#define QTCONCURRENT_RUNBASE_H
e" [+ `& o) H) m# B3 G9 [( \
7 E2 w+ r W5 w" q! o9 @, {1 v: ~3 Q
#include <QtCore/qglobal.h>
8 W% g$ _. `. S7 x
. w, {: c" l% e" \8 o
#ifndef QT_NO_CONCURRENT
* T+ [! c7 c2 d6 @7 t
' ~% S9 ~# I$ y: g$ K* V
#include <QtCore/qfuture.h>
- Q" j+ q# k! T4 f+ X# I$ p
#include <QtCore/qrunnable.h>
. j4 r! A) |+ [6 C0 s* Z
#include <QtCore/qthreadpool.h>
) N) M( s' K- O8 j
b) G, C; V( T* @ a
QT_BEGIN_HEADER
, H0 h4 k' t2 N& B' ]
QT_BEGIN_NAMESPACE
/ K' `5 w( W( m+ i+ U5 U0 S
2 D8 T8 O# E- p% v$ R
QT_MODULE(Core)
z) L1 A3 C* l3 c% l# R1 m, N
/ y( g# g1 d9 O" T" L
#ifndef qdoc
, V8 O9 U K, _; E; o/ j
R* f$ c. d" O& m4 G
namespace QtConcurrent {
3 |7 S) a3 d+ [1 r( d, K* \
9 G7 v+ J0 L2 d" E n9 D( y
template <typename T>
, J6 T- e3 k5 V. _% d0 y
struct SelectSpecialization
{/ o' o( u' L0 v
{
, x7 r4 F4 }% u
template <class Normal, class Void>
4 O+ }3 C, H! e7 K7 ^& L+ ?. l4 n
struct Type { typedef Normal type; };
$ X6 d0 @ N# ]0 ?0 ?: N
};
r0 @6 ~- o- v! B: _
! A. ?5 R2 x! a! H1 n- p
template <>
* B0 x, _8 F- u& A8 o7 ?7 t( a
struct SelectSpecialization<void>
2 }* @) s; {, ? C2 b* [
{
; o7 @/ G* o: e5 H
template <class Normal, class Void>
7 F8 B$ D$ p" d1 C( m+ ?. L9 n6 ]
struct Type { typedef Void type; };
1 ^" M/ M+ [9 }2 g5 [
};
4 _5 F! |. w6 F/ N
8 t1 P9 {; g' X" k3 Z' s
template <typename T>
# K- ^0 ?, I M/ d8 x/ T8 Q! M4 M2 _
class RunFunctionTaskBase : public QFutureInterface<T> , public QRunnable
9 W' y, O- y9 f) |/ ]; a1 W- e# M
{
. D; v+ s6 T! a
public:
% A) c, T/ W' ]
QFuture<T> start()
- M: A/ ?4 ] D% i$ ?
{
% G+ \: m% Q' K* G- i
this->setRunnable(this);
7 T8 h- q& d. R! Z0 ~' Z
this->reportStarted();
; N, y, j N" \& G
QFuture<T> future = this->future();
( |. X9 b4 U: q3 T1 T$ C
QThreadPool::globalInstance()->start(this, /*m_priority*/ 0);
$ m7 n8 f4 a% q6 S# q
return future;
, l' |, P7 }* a- p3 W. Q7 E3 q( e7 ?5 f
}
9 q$ }- x0 [6 v6 ?0 @
/ ~: U3 W q8 s7 H+ X4 {+ [
void run() {}
* T& K8 W& M" a! |
virtual void runFunctor() = 0;
5 @9 A$ g+ _1 O7 C
};
5 A1 M6 v+ v, S& W; J7 N
9 V; {0 [- C* P# ]9 q5 z! Z/ [- D5 G
template <typename T>
4 b3 v T+ I- T% ]
class RunFunctionTask : public RunFunctionTaskBase<T>
' n. n) _- | R) F6 r
{
{9 Q9 L, W( h: v: S
public:
! K) F3 a; i5 p4 o/ Q/ X+ D2 ?$ A
void run()
2 ~/ h% ~/ N. p7 [9 r! j( U6 q' I8 t
{
. ~2 d/ W) O" s8 E5 w* ]. C# B
if (this->isCanceled()) {
# D4 Y4 m% ]; I" |0 ]
this->reportFinished();
$ X* _, S: k+ E8 @$ k0 _
return;
8 f5 F" x$ k; e* H" \0 e0 F/ U7 s
}
# @' V/ {! n1 x# u
this->runFunctor();
$ h0 t v; n( h/ n8 t, Z- K% o
this->reportResult(result);
+ y0 R8 S1 D% E( N$ X
this->reportFinished();
7 C9 }7 A, _$ u6 g: Y( e
}
& y* ~! l0 d: d1 r' X
T result;
3 h/ M6 Y9 `0 n5 b. C' B- z0 m; B
};
% O4 a. }2 s$ U% U' {
1 |. p4 ]: G9 E' r
template <>
' S# \5 w1 U' E( g
class RunFunctionTask<void> : public RunFunctionTaskBase<void>
3 R4 \/ {6 e, f; L8 M
{
$ C" s6 x, Y# Y1 Y
public:
0 @0 f8 O! O w! ?# {
void run()
; Y' I/ B5 f! {: h% E6 H* l7 L4 m
{
. G' O4 x$ z. d) t1 Z( \: T
if (this->isCanceled()) {
9 r1 Z" r8 Y5 w& J
this->reportFinished();
) c* j/ D. H; e7 D! P ^: P2 r
return;
2 j7 w1 |' U' V6 ?
}
% ]; s" }2 C. d* |- n/ Y* a8 F
this->runFunctor();
! W, g+ E: J9 E5 E3 r) P
this->reportFinished();
0 H/ z( S, e. s4 v U, U7 J1 G
}
" P8 L3 O5 _: m7 z! [: [0 f( J
};
Y; [) q" b4 G9 y, ^$ l( X3 R/ C
: v' d3 k1 u/ A# g6 r, a. U
} //namespace QtConcurrent
0 t; H' {; [( Q( ]' b
2 C% P' }+ \& a
#endif //qdoc
! a% G% \ L5 C1 D" e' d" ?
5 P7 e w0 ^! y4 B
QT_END_NAMESPACE
3 E4 s! y9 K7 J s
QT_END_HEADER
a- T, S n5 n' Z& I* K: h
3 M# A7 b) J% D, z
#endif // QT_NO_CONCURRENT
4 _" J5 W# U; ]7 t( c' p: O
! x$ z) ?' S+ c- _
#endif
# S- Z! h! ^+ D" A( c
& i7 z' X4 u: G1 C7 F; s# C
作者:
2532609929
时间:
2015-1-12 22:22
是做创龙哪个文档的实验呢?没看出来!可以将编译命令、步骤写出来吗?
+ D8 T8 s7 z h- Q4 n+ C
欢迎光临 嵌入式开发者社区 (https://www.51ele.net/)
Powered by Discuz! X3.4