青华模具培训学校

 找回密码
 注册

QQ登录

只需一步,快速开始

青华模具培训学院
查看: 2072|回复: 2

请问大虾,我这是缺少什么吗?

[复制链接]
发表于 2009-3-6 17:31 | 显示全部楼层 |阅读模式
// Create Block.cpp : Defines the entry point for the DLL application.
; e9 u5 A% H. q1 P' o//- w. O0 N1 U  K) c) a4 ]
#include "stdafx.h") Y$ h7 r" f" ^* n% Q0 q% T6 f/ O
#include <uf.h>( b* j. K2 h: ^# C( [. j( ~8 _
#include <uf_exit.h>7 H0 A9 h) d* ]' o
#include <uf_ui.h>
; I: p) o& R" n: E: Jvoid ufusr(char *param, int * retcode, int paramLen)
& I! m( N  r$ j8 J{7 i( R6 }1 C- H: r8 B
if (! UF_CALL(UF_initialize()))//获取二次开发许可8 M; r2 {+ w9 J! x2 ?# M' d1 `, n8 F
{
) v5 _/ x! [+ t4 d7 d2 |" Z  H  do_ugopen_api();//实际工作函数,即用户编写的程序
) m( Y& Z9 E% x" ]  UF_CALL(UF_terminate());//释放二次开发许可
% n) K5 e& Y( b# C9 I3 D3 q }' x& S, M$ J4 k' C& m6 G' H
else/ X, }9 I1 Y" E  F9 ]! ^
{! @$ Y) E& Y2 ^
  uc1601("获取开发许可失败,退出!",1);//获取二次开发许可失败,提示用户  K6 C' ~+ W- I) B4 f  w4 d; w
}$ K" J/ R# o; H
int ufusr_ask_unload(void)
! ~0 a$ t' L) j {
! [- k* S* S' f  r1 w# v9 L  return(UF_UNLOAD_IMMEDIATELY);//完成操作后立即从内存中卸除
' P) M9 f- v6 k0 E5 O( R: O8 H}
" g  z- A2 {0 ^% C$ X' J2 G# U
5 C6 y6 f# u# S5 x**出现的提示为:3 H& }2 b6 A! T4 t- j! J/ h
--------------------Configuration: Create Block - Win32 DebUG--------------------
; B/ g5 ^, B- w1 F% R$ rCompiling...
) o3 E% P$ w  h& n/ J8 ACreate Block.cpp! U9 ^! u4 B  l
1。e:\open api\create block\create block.cpp(12) : error C2065: 'UF_CALL' : undeclared identifier
; J6 v( |0 ^6 |% W8 P$ v2。e:\open api\create block\create block.cpp(14) : error C2065: 'do_ugopen_api' : undeclared identifier( r( p; ]5 L+ P6 y
3。e:\open api\create block\create block.cpp(24) : error C2601: 'ufusr_ask_unload' : local function definitions are illegal
9 n3 _8 `; D+ ~- Q& q- l4。e:\open api\create block\create block.cpp(30) : fatal error C1004: unexpected end of file found7 [4 Q1 v+ V2 ~4 N8 G# F
执行 cl.exe 时出错., w4 I1 t9 p% h
Create Block.obj - 1 error(s), 0 warning(s)  V* v: l2 o8 D) W" i
请问我这里的问题出在哪里?6 _4 [+ q# ?2 I# e7 E7 J! ]& f! [* r
1。2。都是说我没有申请变量,3。说我加载功能定义违法?4。未预料的重大错误?2 B  o. J( b7 c" b
以上这些是我个人的理解,恳请大虾指点迷经!谢谢!
发表于 2009-3-7 10:30 | 显示全部楼层
UF_CALL
* H: z7 z# }, B8 ]7 D  R* N3 _需要你定义的
6 d6 O: h. u' a1 U不是NX OPEN自己带的
1 c2 `) s2 {! N9 }% I你可以删除了 如果你保证你的程序没有问题的话2 L9 @; F* y1 \' g# d
2 b: e; p$ |& h3 U
'ufusr_ask_unload 'do_ugopen_api' 两个函数都没有定义
. c) B4 Y; I4 Q6 X$ R& ^' X  c* p不知道你是从哪儿复制来的程序
* _* ]  R/ X2 ^* ?3 V没有复制全
回复 支持 反对

使用道具 举报

发表于 2009-3-10 20:43 | 显示全部楼层
自己写的函数,写了具体的定义之后,别忘了声明啊!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|关于我们|sitemap|小黑屋|Archiver|手机版|UG网-UG技术论坛-青华数控模具培训学校 ( 粤ICP备15108561号 )

GMT+8, 2025-5-10 14:53 , Processed in 0.059764 second(s), 26 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表