|
最近在学ug二次开发,想先编一个最简单的长方体遇到了困难,API,内部,C++,程序总是有一个错误,unexpected end of file while looking for precompiled header directive,环境配置完全按照书上说的设置,网上各种解决办法都试了还是不行,麻烦您给我指导下,究竟该怎么办,非常感谢啊,以下是我的程序:
7 p& ?, ]5 h r" Q2 x! M#include "stdafx.h") x$ T$ P% C' _7 H. @; u
1 O9 J- k4 c/ [
#include "uf.h"
1 D4 ^% w8 L& G. R& e#include "uf_modl.h"
9 T( w8 M, i8 N, X3 T0 ~$ V#include "uf_ui.h"
! B4 S$ Y4 `( ~4 a. a1 ]#include "uf_UGopenint.h"/ J( ~* N& j7 A! B, Y
% [8 L: v4 L4 M0 O1 L6 x4 t2 N+ ^" k#define UF_CALL(X)(report(_ _FILE_ _,_ _LINE_ _,#X,(X)))
5 ~9 O2 y3 S% G1 V& {static int report (char *file,int line,char *call,int irc)+ ^* o2 _- m2 u# q# X
{
: |) t. O$ i: T7 }9 |" D if (irc)
) e1 K+ f' K0 n {char msg[133];$ \1 J2 E* _# |( C+ C7 V6 h
printf ("%s,line%d:%s\n",file,line,call);2 L# A Y9 x4 x/ S
(UF_get_fail_message(irc,msg))?" J4 [* E4 x# i3 M( f A% F+ ^0 @ \
printf("returned a %d\n",irc): H9 Z5 `0 I5 d8 I' H
printf("returned error %d:%s\n",irc,msg);
) t, {" M0 ^% t6 y1 p' z }
1 ^: P4 L m0 A! G return(irc);
" T: Y$ d0 b* ]8 l0 F/ F8 r" f}( j# m8 J7 a0 }9 Z$ W
$ T/ O# w# @$ A5 o0 {2 Ostatic void do_ugopen_api(void)3 F- p/ V2 W3 D6 B; `2 d/ o
{UF_FEATURE_SIGN sign=UF_NULLSIGN;
- \8 K: Q3 K* ?9 u0 F% edouble block_orig[3]={0.0,0.0,0.0}; a3 |' Q: z4 X* u' A" i
char *block_len[3]={"1","2","3"};
% p3 W6 \& G5 J2 F+ Wtag_t blk_obj;
O0 b) X6 z& o2 c4 E6 wUF_CALL(UF_MODL_create_block1(sign,block_orig,block_len,&blk_obj));: W2 ]( a. p8 D3 p
}
0 I3 A3 _5 d4 x9 I4 H" C( Q
) k3 b) K# p% J" O3 U( q* Cvoid ufusr(char *param,int *retcode,int paramLen)
) Y9 p- M$ l9 P5 o+ ~{/ d% H7 p- i0 }
if (!UF_CALL(UF_initialize()))
. o" i" B0 B* {7 _{do_ugopen_api();
9 t$ a3 {% h: ` UF_CALL(UF_terminate());4 F) ?. F; ^! ~+ {5 ~- @
}
4 P! s: g# f e( D% Velse
5 y5 F8 r5 W$ Q0 \3 h1 w1 P8 f{uc1601("获取开发许可失败,退出",1);; P( P' j# s# y3 `3 z; N- a" k- F7 {
}: q( v7 v8 j9 Y# j
}" E' T) w$ I, X; h5 X
/ j, `/ r0 H$ f0 {int ufusr_ask_unload(void)
* {( g/ S4 t t2 M+ w( V4 @{' W. p- {6 I. @7 U% H. c7 V. `
return (UF_UNLOAD_IMMEDIATELY);
6 b7 ~5 Q9 }7 L* Q( G# I Y} |
|