|
为什么用vc6.0 组建后就是有一个错误,怎么也解决不来!!
9 G* }" T8 a% ?3 R5 @2 r6 |9 E; J5 f1 a# y5 _9 e6 b; T* n) f5 F
程序如下:挺简单的* j0 U0 W2 C! e6 h
$ A* O# p* f0 a3 g+ b" ^0 o/ _#include <stdio.h>, z# T9 \2 |+ R& ^4 c: a- Z* |
#include <uf.h>
- F- u3 T: `7 D! m#include <uf_modl.h>/ l) `. E: u. e' C& u
#define UF_CALL(X) (report( __FILE__, __LINE__, #X, (X)))! ?3 g1 x$ C2 t+ F' X7 U
static int report( char *file, int line, char *call, int irc)/ {7 _( j7 q" X( f$ {- `- H
{
. J" o. Y8 x; y if (irc)! v& {0 P% [8 d& a) L
{" w7 E/ K1 U3 W# q3 S7 p2 c' W
char messg[133];$ C1 b. m* p& S* A, Y! ~+ b
printf("%s, line %d: %s\n", file, line, call);& N2 f! u5 ?% U6 f1 w% r. ?8 G
(UF_get_fail_message(irc, messg)) ?- O6 ?; |* w1 P* `8 i: I
printf(" returned a %d\n", irc) :
: d- l- o* p9 R/ a2 D6 P printf(" returned error %d: %s\n", irc, messg);
- U( A6 ^+ e# V9 q }
( S+ _* G) k' o- W' O return(irc);) f# G" R; ?: a: i. E4 ?- i
}
9 z$ c3 U/ `+ A5 G: Mstatic void do_ugopen_api(void)
, y, C A7 F+ T+ o{
1 Y7 M A) m% B% {6 z4 L2 Y /* 用户在此编写自己的UF程序 */. `3 y# l# P9 c1 I% O7 C
UF_FEATURE_SIGN sign = UF_NULLSIGN;. L3 z' x' x6 z* R2 C- W
double block_orig[3] = {0.0,0.0,0.0};. ]% a+ J! d) W. ]# [, l
char *block_len[3] = {"1","2","3"};
# b- [! `! V; }6 ?( e- \# v( h tag_t blk_obj;
/ ~* }. a" Y3 H2 y+ I UF_CALL(UF_MODL_create_block1(sign, block_orig, block_len, &blk_obj));9 [( S5 y c m
}: I% ]9 w0 U0 G3 P# [3 Q
/*ARGSUSED*/
1 Y8 n) z( ]2 ]1 M/ ~8 Q" A& {void ufusr(char *param, int *retcode, int paramLen)' R( ]" I* b4 S0 e$ L( J
{- T T0 ?6 ] x
7 ?, \: r% y2 S/ d3 e
! H9 o8 v8 H- k. R8 {" x1 y
if (!UF_CALL(UF_initialize()))
) `( `/ O5 D( B$ |8 ~/ h {
& \3 _3 N- ~/ g9 ^; { do_UGopen_api();$ C+ I- ]7 o* J& o
UF_CALL(UF_terminate());
; t. [0 O4 X. q9 G4 T }& {; u3 p4 b* w+ N
}8 |# T, w! x/ M6 f7 e
int ufusr_ask_unload(void)
: r4 | L; S- U5 m{
/ r2 H# k# F, c return (UF_UNLOAD_IMMEDIATELY);
1 [# D- s, L0 D1 @+ E7 [}9 }1 q8 q- p0 C7 y; [
: h0 D8 s. x) `0 R0 D$ Y2 q6 u6 H* E
( r u* T+ A( V" t H1 a* R+ B" |1 F" W/ ^/ }; [
6 v$ B' T0 x3 `& [错误显示:, G6 n4 C- A" x( P# g" \
Compiling...
6 A+ a2 G0 Z$ s8 i) n, ]create block.cpp% {* Q3 |# q( A6 c* V
G:\UG\ugbook\create block\create block.cpp(11) : error C2065: 'printf' : undeclared identifier
3 |- C# e2 v0 m1 v* E, s7 ZG:\UG\ugbook\create block\create block.cpp(12) : error C2065: 'erc' : undeclared identifier5 S% |8 R. X6 y$ R! h
G:\UG\ugbook\create block\create block.cpp(25) : error C2065: '_' : undeclared identifier
2 G" n- F! Y4 jG:\UG\ugbook\create block\create block.cpp(25) : error C2146: syntax error : missing ')' before identifier '_FILE_'
4 ]3 A8 i' B8 m# M& {G:\UG\ugbook\create block\create block.cpp(25) : error C2059: syntax error : ')'
( K K; r6 |4 p. ^- SG:\UG\ugbook\create block\create block.cpp(29) : error C2146: syntax error : missing ')' before identifier '_FILE_'/ v! L3 P. _3 m$ t/ f' k [
G:\UG\ugbook\create block\create block.cpp(29) : error C2059: syntax error : ')'9 _+ `$ \( I0 q, ?0 k% i+ p
G:\UG\ugbook\create block\create block.cpp(30) : error C2143: syntax error : missing ';' before '{'0 i' M6 _) t' |
G:\UG\ugbook\create block\create block.cpp(32) : error C2146: syntax error : missing ')' before identifier '_FILE_'- F& n' T' w+ T/ p' _+ C7 }
G:\UG\ugbook\create block\create block.cpp(32) : error C2059: syntax error : ')'
- u8 Y5 H5 X8 G' O1 w" W$ gG:\UG\ugbook\create block\create block.cpp(34) : error C2181: illegal else without matching if3 m& w+ l' T9 O( K3 v& D
执行 cl.exe 时出错.
% {, |. S' q5 j7 N, SCreateBlock.exe - 1 error(s), 0 warning(s)
? q' n! d% o* G1 N2 E; r( Z, q
9 F2 _+ q0 d% r
无法生出dll文件啊 怎么办?? 强调我是新手 |
|