|
为什么用vc6.0 组建后就是有一个错误,怎么也解决不来!!2 B( K3 E6 J+ J: C- Z
1 f& Z$ q4 t+ H程序如下:挺简单的/ p# I( m; d1 H. X) v
0 | c7 _' Z m
#include <stdio.h>
, E* s, v; i- J1 X! V; U4 v#include <uf.h>0 g8 _6 ^, `, R
#include <uf_modl.h> a0 a$ q, Q% u& F- ~( E
#define UF_CALL(X) (report( __FILE__, __LINE__, #X, (X)))1 D2 L1 W' J( l- p l: d
static int report( char *file, int line, char *call, int irc)/ G. q2 G9 n$ B0 c1 ^
{
8 D5 r- w* n6 _4 I3 E$ ?# ` if (irc)1 u I: t# B {% G
{% ?! p) k0 k6 p% y( W7 S
char messg[133];3 s5 c$ m w7 D* l9 {
printf("%s, line %d: %s\n", file, line, call);
; e6 h2 x$ @ o3 P3 ?3 t0 j (UF_get_fail_message(irc, messg)) ?" N9 B% X. f9 f' U, K' ]
printf(" returned a %d\n", irc) :( f4 J' |: f5 {( u/ e
printf(" returned error %d: %s\n", irc, messg);. e1 {" Z& a" b% k {" A; K# n
}
5 f+ R, V0 `4 e/ r return(irc);
* j& X/ O2 \/ H- y# r/ s}1 r& c: S& \- V1 X3 a
static void do_ugopen_api(void)
* D. C3 @) o% B- O" a7 N( U5 L{( R* y: u! D8 I, q# Z+ ]
/* 用户在此编写自己的UF程序 */4 `6 N3 ]3 g. x2 F. I) g+ G* w6 m* p
UF_FEATURE_SIGN sign = UF_NULLSIGN;
6 ~ y# q* c. ?6 J4 R: @# [ double block_orig[3] = {0.0,0.0,0.0};9 m, {# r* k+ O
char *block_len[3] = {"1","2","3"};
4 i) U' s6 V8 Z' R tag_t blk_obj;7 K& U- d H4 Q) b. T- Z
UF_CALL(UF_MODL_create_block1(sign, block_orig, block_len, &blk_obj));" J/ W6 T) ~* G
}
$ t2 o+ J+ b- a/*ARGSUSED*/
0 x9 P! W( O( A4 H0 R6 ], kvoid ufusr(char *param, int *retcode, int paramLen); O8 y8 Q: x$ y0 m" m
{6 Q+ ~5 l+ M. V. \. S
% A: W% ^9 h% O- j7 [4 i5 P2 b
; p) ^1 |% ]0 Z! t if (!UF_CALL(UF_initialize()))
5 [ s) T7 U# F3 p# q6 m; T1 _9 |/ l {7 j% z& x& p+ G, m3 a' Z) s; k3 ?2 w) R
do_UGopen_api();
1 w/ P" S1 p4 U0 x4 b# a UF_CALL(UF_terminate());3 u) u; s$ M% }
}
; n9 k o1 A% u2 H3 u$ s1 b( J2 p: M}3 t3 u/ x. G$ u p8 |4 t
int ufusr_ask_unload(void)" K5 i# ~5 R& R# _; S- Y/ Q& b
{) |9 k# Q3 I" S
return (UF_UNLOAD_IMMEDIATELY);
/ r7 t9 T/ d% ^ Q+ I/ n}3 B+ g0 o2 W; b- K |# o+ p
, n4 w, Z$ |7 Y. a$ ^ _( U& b8 _* K, V) {% T* E# q+ o) B
$ u. c- U7 |0 {) M8 w3 _ i7 w. [' {* X& a. D% s4 P
错误显示:
, [" Z+ z: Q6 L9 |- A9 h7 oCompiling...9 c7 i! `2 f/ \
create block.cpp
4 w5 F. s" L, E4 S. LG:\UG\ugbook\create block\create block.cpp(11) : error C2065: 'printf' : undeclared identifier
& |) V8 j- g" L& EG:\UG\ugbook\create block\create block.cpp(12) : error C2065: 'erc' : undeclared identifier5 l9 A& P2 F J) m+ U+ Z
G:\UG\ugbook\create block\create block.cpp(25) : error C2065: '_' : undeclared identifier4 E$ t( \5 Q( p
G:\UG\ugbook\create block\create block.cpp(25) : error C2146: syntax error : missing ')' before identifier '_FILE_'
{. Z' r" t4 H3 i; ]G:\UG\ugbook\create block\create block.cpp(25) : error C2059: syntax error : ')'$ O6 i' [4 R& T+ U1 F7 h
G:\UG\ugbook\create block\create block.cpp(29) : error C2146: syntax error : missing ')' before identifier '_FILE_'
' N! M2 L% S. F3 ~# cG:\UG\ugbook\create block\create block.cpp(29) : error C2059: syntax error : ')'
1 G f( k6 H; p, C6 OG:\UG\ugbook\create block\create block.cpp(30) : error C2143: syntax error : missing ';' before '{'9 d1 b8 R9 E( t* T' T
G:\UG\ugbook\create block\create block.cpp(32) : error C2146: syntax error : missing ')' before identifier '_FILE_'
. @9 ~% G* a7 R+ }G:\UG\ugbook\create block\create block.cpp(32) : error C2059: syntax error : ')'
; e4 a& ^# l {$ C2 ?' b( @1 QG:\UG\ugbook\create block\create block.cpp(34) : error C2181: illegal else without matching if6 q& t5 W9 U2 A& [' t
执行 cl.exe 时出错. d! L4 C8 i7 ^3 r. d: _- F
CreateBlock.exe - 1 error(s), 0 warning(s)! J; c9 X6 L* `3 x- G+ p) r' a$ ]
6 n" p% S, g* ^$ f9 S! Z
7 D5 T7 S0 i; h! X) ~
无法生出dll文件啊 怎么办?? 强调我是新手 |
|