|
为什么用vc6.0 组建后就是有一个错误,怎么也解决不来!!- d/ y3 V, T: I( h q5 Y
) E6 @) U0 I( o; x9 N! T2 j程序如下:挺简单的! `; P: H/ t- ~' A
8 n8 f8 _" f/ u C r. z
#include <stdio.h>
& n- `: l+ [( i" N#include <uf.h>2 f( u. \6 J7 y* s( R
#include <uf_modl.h>; g/ F# \! H6 w$ h' d% }
#define UF_CALL(X) (report( __FILE__, __LINE__, #X, (X)))
) C$ N+ b E6 I5 W7 _static int report( char *file, int line, char *call, int irc)3 d3 r) W( h& l9 v
{$ U+ ]* A0 a7 U7 v2 C& T
if (irc)8 I* u, ]/ W; ?* `8 R; H5 _3 p
{
+ D# G) C: M* @* J. W' w# X1 }' K9 e char messg[133];
4 I! p& F, ]* n printf("%s, line %d: %s\n", file, line, call);
1 T+ R) [% Y# E% b" C (UF_get_fail_message(irc, messg)) ?
, ~) E' H/ J1 F' `' v% C1 \ printf(" returned a %d\n", irc) :6 E. l& K% ~6 i( P0 ^# U
printf(" returned error %d: %s\n", irc, messg);: Y! c8 r& B9 J) T* k5 ]' U
}
. q+ h4 C: F9 w9 }( a return(irc);' m% K7 { m4 }6 r& N3 z" t$ c
}8 u" a& G1 b( l" h2 J1 l
static void do_ugopen_api(void)
4 c0 a; M G# r9 }) X' y/ }& ?{2 L" h6 I( u; C/ z. T0 Q/ ~5 E
/* 用户在此编写自己的UF程序 */; {% I9 b% ?1 ~, l
UF_FEATURE_SIGN sign = UF_NULLSIGN;9 J4 Q3 j3 |5 k% i3 \# A9 @1 X
double block_orig[3] = {0.0,0.0,0.0};) A+ }" d* J" @% g4 K9 x. ~8 {3 h2 j
char *block_len[3] = {"1","2","3"}; K' F* R3 S8 Z( O# w9 f" F
tag_t blk_obj;/ i7 U. @; q% q" \5 j
UF_CALL(UF_MODL_create_block1(sign, block_orig, block_len, &blk_obj));
7 o7 O, o: w4 V) `9 _}
* T* Y4 h% a" N+ A% J' ]/*ARGSUSED*/* i/ l, B. \( { Q
void ufusr(char *param, int *retcode, int paramLen)+ P3 C% [, o5 B) K) V
{
5 L$ l: [& D: R2 f. T: T 0 Z1 S6 v g* e1 r0 ?( Y
1 Q& Y, ^5 G. G r if (!UF_CALL(UF_initialize()))3 y5 R% f4 t$ H0 M: X, t
{
" I" B; f% S- X+ d: [ do_UGopen_api();/ j' I- K4 @& ?/ N6 E2 P) g0 j' M
UF_CALL(UF_terminate());! c, C) p4 G3 w6 p- I( @
}
6 M' ~3 Z3 I% ^( N# ~' w3 V}
. e1 C' D5 E8 k5 B& e+ Lint ufusr_ask_unload(void)3 N) U ?2 H8 `2 M7 R4 q
{0 |$ \0 `' ]0 @& v
return (UF_UNLOAD_IMMEDIATELY);
3 z9 S O( g; w$ Z} M5 T$ h: i' c
) l9 F/ U! w8 m0 c1 t k
( f" ^) s8 q) b( U
$ ~7 e/ j" X9 W
1 W$ }2 m. x5 Z$ w" H# o( K! j错误显示:/ V/ K% Y: |9 _" d$ B- @, Y
Compiling...
. t( M7 ]3 B) Ucreate block.cpp
" i! Z B1 `6 C3 d" p6 `3 R# Q/ cG:\UG\ugbook\create block\create block.cpp(11) : error C2065: 'printf' : undeclared identifier5 d. d+ _. C' K/ m+ Y' {
G:\UG\ugbook\create block\create block.cpp(12) : error C2065: 'erc' : undeclared identifier$ @( P0 @) t% Z2 Y( I) L i
G:\UG\ugbook\create block\create block.cpp(25) : error C2065: '_' : undeclared identifier
" h, R7 }, o% H4 c6 v# FG:\UG\ugbook\create block\create block.cpp(25) : error C2146: syntax error : missing ')' before identifier '_FILE_'7 x3 ?# P2 I- j# F3 C
G:\UG\ugbook\create block\create block.cpp(25) : error C2059: syntax error : ')'
+ |" j$ k% X5 C6 T4 w! EG:\UG\ugbook\create block\create block.cpp(29) : error C2146: syntax error : missing ')' before identifier '_FILE_': @/ V/ {( M1 M& g( b& B
G:\UG\ugbook\create block\create block.cpp(29) : error C2059: syntax error : ')') l( z7 r: l2 `
G:\UG\ugbook\create block\create block.cpp(30) : error C2143: syntax error : missing ';' before '{'1 n1 V( w6 j; C
G:\UG\ugbook\create block\create block.cpp(32) : error C2146: syntax error : missing ')' before identifier '_FILE_'( r" k. T: d" Y2 u; }
G:\UG\ugbook\create block\create block.cpp(32) : error C2059: syntax error : ')'& [7 n3 |7 W( t" r8 {# J- L- c
G:\UG\ugbook\create block\create block.cpp(34) : error C2181: illegal else without matching if( l" M4 x2 x5 B7 T+ P% } z
执行 cl.exe 时出错.
4 k" P, u1 a0 [& O ICreateBlock.exe - 1 error(s), 0 warning(s)4 {5 x6 x; e6 A t7 Y
6 @& z- e! L# ?, D' g9 U; ^
* I0 O7 h9 s3 J4 B! {# K, s8 w无法生出dll文件啊 怎么办?? 强调我是新手 |
|