|
为什么用vc6.0 组建后就是有一个错误,怎么也解决不来!!
) u6 E) p& p T: n! P& B! ~* E( l
# p3 z7 R* \( p程序如下:挺简单的
: |2 c# ~( C+ V8 i' ?
0 w; t) h' s$ l0 K9 w#include <stdio.h>& @$ g1 Z+ e) O& Y5 x7 W
#include <uf.h> m W n4 [; h- D1 U% ]5 p
#include <uf_modl.h>
6 w+ b: F3 q' J- h#define UF_CALL(X) (report( __FILE__, __LINE__, #X, (X)))
/ Q0 c1 c& U: B k1 estatic int report( char *file, int line, char *call, int irc)
b; l3 ?4 q# f7 F; q" a, Z{
1 ^0 }1 R2 Q; d/ f' H; n if (irc)2 u6 Y9 k/ b. v) G
{
9 p* h$ o* T( f- M Y: H char messg[133];
$ }4 T8 I' W6 `7 I# T# U. n printf("%s, line %d: %s\n", file, line, call);
2 }# k' B+ o6 o: K2 f1 n' n: T (UF_get_fail_message(irc, messg)) ?1 H! S6 }$ I2 y5 ?( Z' H* W8 C6 |& x
printf(" returned a %d\n", irc) :
7 H% a1 _' K6 ]2 {- s) u2 y7 b) J% G printf(" returned error %d: %s\n", irc, messg);" O T' I2 {, P2 k5 ?( Z1 K- y. A
}! I7 E6 A0 b) V2 A
return(irc);
3 w4 T8 @- N( s- W/ y( }) S}
# `. e3 j5 F7 R C( d9 nstatic void do_ugopen_api(void)
# f) P+ t( {0 ~! _{! G W$ p" E4 c: k' ]
/* 用户在此编写自己的UF程序 */
7 d* l$ Z5 C8 d- A7 d/ s UF_FEATURE_SIGN sign = UF_NULLSIGN;
6 k$ N% _3 q8 n% z7 D4 z) u double block_orig[3] = {0.0,0.0,0.0};3 N1 g: E3 s7 S! P% u: N
char *block_len[3] = {"1","2","3"};
: G& J- t+ T5 j! ^3 U& \% @ tag_t blk_obj;8 N) Z2 ^' `+ k# W9 \( S
UF_CALL(UF_MODL_create_block1(sign, block_orig, block_len, &blk_obj));
* @# Y% ~5 h; Y! Z}
; t+ Z0 k3 i: q- u/*ARGSUSED*/, L: Z. o% `4 d; ^
void ufusr(char *param, int *retcode, int paramLen)5 X; ^2 ?) u! Z+ @1 j0 G7 M
{
+ I* Y: F' j; M" H5 ~5 `
. O) L+ n, B: ?1 _
9 H2 H: F+ x- n f7 t, `" D if (!UF_CALL(UF_initialize()))
8 h, M# {3 j: {, K {
* e( S# N: r F) O do_UGopen_api(); V: h1 M/ i0 q' n; H
UF_CALL(UF_terminate());5 c0 V; p1 ^4 P# p7 ^+ k9 k
}- D4 c% x) O5 }# x; t
}: ^7 @5 m0 C0 {* T
int ufusr_ask_unload(void)
; A- o% g: B$ r! B3 F5 g6 c. e{7 z$ k2 g A/ C( g; f% w- d1 l' I# `& w, w
return (UF_UNLOAD_IMMEDIATELY);
' z1 U* G% g+ W+ a, n/ t# Z" Y}6 N+ j9 r( m9 J2 a- l6 v# ]; h
/ M* w' L W% `6 M) ?* v1 M J6 D- f
! z* r+ U6 I1 E, p) t' ^) { Y9 m6 r# Z( s
- G$ P5 `! s6 \, O: u4 T, _$ o U1 i
错误显示:
( `1 t M R v z$ }9 ?Compiling...
: H) [# p6 \6 ~1 Dcreate block.cpp' @ Y4 s1 ?+ s8 q
G:\UG\ugbook\create block\create block.cpp(11) : error C2065: 'printf' : undeclared identifier
* B/ `0 u& R$ B" c. l# GG:\UG\ugbook\create block\create block.cpp(12) : error C2065: 'erc' : undeclared identifier
9 }4 s. M- G2 o. @' V$ pG:\UG\ugbook\create block\create block.cpp(25) : error C2065: '_' : undeclared identifier1 h' B, j q. |% U" c, b) y W6 @
G:\UG\ugbook\create block\create block.cpp(25) : error C2146: syntax error : missing ')' before identifier '_FILE_'" [# n. d6 }; `) d/ f5 h3 a% K( w0 g
G:\UG\ugbook\create block\create block.cpp(25) : error C2059: syntax error : ')'
: g p" y7 x' a1 B+ i8 tG:\UG\ugbook\create block\create block.cpp(29) : error C2146: syntax error : missing ')' before identifier '_FILE_'
9 Z- j1 B0 @. }" H4 sG:\UG\ugbook\create block\create block.cpp(29) : error C2059: syntax error : ')'& ^" ?* g$ @/ f- C, r3 |
G:\UG\ugbook\create block\create block.cpp(30) : error C2143: syntax error : missing ';' before '{': ?# T! x% G6 A6 e: a
G:\UG\ugbook\create block\create block.cpp(32) : error C2146: syntax error : missing ')' before identifier '_FILE_') t d2 u# f. f3 a3 C5 ]! Z
G:\UG\ugbook\create block\create block.cpp(32) : error C2059: syntax error : ')'
% e$ ?! O: z1 l2 cG:\UG\ugbook\create block\create block.cpp(34) : error C2181: illegal else without matching if& q& C. T% l7 [
执行 cl.exe 时出错.
! X! k1 [+ Q" D& a1 Z* _- T4 |6 hCreateBlock.exe - 1 error(s), 0 warning(s)
" u9 u1 D# U% o, j+ U7 d
8 D* L& h( O& x& ~) h+ V. {; |8 x; ?! k) D5 E5 Z, F* B
无法生出dll文件啊 怎么办?? 强调我是新手 |
|