找回密码 注册 QQ登录
开思网工业级高精度在线3D打印服务

iCAx开思网

CAD/CAM/CAE/设计/模具 高清视频【积分说明】如何快速获得积分?快速3D打印 手板模型CNC加工服务在线3D打印服务,上传模型,自动报价
12
返回列表 发新帖
打印 上一主题 下一主题

我学UG二次开发,但不知道下列函数出自哪个头文件

[复制链接]
11
发表于 2004-10-13 14:27:29 | 只看该作者
定义位置变了后,还是有问题,出现了以下错误
f:\ug\list\list.c(66) : error C2275: 'UF_FEATURE_SIGN' : illegal use of this type as an expression
        c:\program files\eds\unigraphics nx\ugopen\uf_modl_types.h(546) : see declaration of 'UF_FEATURE_SIGN'
f:\ug\list\list.c(66) : error C2146: syntax error : missing ';' before identifier 'sign'
f:\ug\list\list.c(66) : error C2065: 'sign' : undeclared identifier
f:\ug\list\list.c(67) : error C2275: 'UF_FEATURE_SIGN' : illegal use of this type as an expression
        c:\program files\eds\unigraphics nx\ugopen\uf_modl_types.h(546) : see declaration of 'UF_FEATURE_SIGN'
f:\ug\list\list.c(67) : error C2146: syntax error : missing ';' before identifier 'sign1'
f:\ug\list\list.c(67) : error C2065: 'sign1' : undeclared identifier
f:\ug\list\list.c(68) : error C2143: syntax error : missing ';' before 'type'
f:\ug\list\list.c(69) : error C2143: syntax error : missing ';' before 'type'
f:\ug\list\list.c(70) : error C2143: syntax error : missing ';' before 'type'
f:\ug\list\list.c(71) : error C2143: syntax error : missing ';' before 'type'
f:\ug\list\list.c(72) : error C2275: 'tag_t' : illegal use of this type as an expression
        c:\program files\eds\unigraphics nx\ugopen\uf_defs.h(52) : see declaration of 'tag_t'
f:\ug\list\list.c(72) : error C2146: syntax error : missing ';' before identifier 'blk_obj'
f:\ug\list\list.c(72) : error C2065: 'blk_obj' : undeclared identifier
f:\ug\list\list.c(73) : error C2275: 'tag_t' : illegal use of this type as an expression
        c:\program files\eds\unigraphics nx\ugopen\uf_defs.h(52) : see declaration of 'tag_t'
f:\ug\list\list.c(73) : error C2146: syntax error : missing ';' before identifier 'blk1_obj'
f:\ug\list\list.c(73) : error C2065: 'blk1_obj' : undeclared identifier
f:\ug\list\list.c(74) : error C2065: 'block_orig' : undeclared identifier
f:\ug\list\list.c(74) : warning C4047: 'function' : 'double *' differs in levels of indirection from 'int '
f:\ug\list\list.c(74) : warning C4024: 'UF_MODL_create_block1' : different types for formal and actual parameter 2
f:\ug\list\list.c(74) : error C2065: 'block_len' : undeclared identifier
f:\ug\list\list.c(74) : warning C4047: 'function' : 'char ** ' differs in levels of indirection from 'int '
f:\ug\list\list.c(74) : warning C4024: 'UF_MODL_create_block1' : different types for formal and actual parameter 3
f:\ug\list\list.c(75) : error C2065: 'block_orig1' : undeclared identifier
f:\ug\list\list.c(75) : warning C4047: 'function' : 'double *' differs in levels of indirection from 'int '
f:\ug\list\list.c(75) : warning C4024: 'UF_MODL_create_block1' : different types for formal and actual parameter 2
f:\ug\list\list.c(75) : error C2065: 'block_len1' : undeclared identifier
f:\ug\list\list.c(75) : warning C4047: 'function' : 'char ** ' differs in levels of indirection from 'int '
f:\ug\list\list.c(75) : warning C4024: 'UF_MODL_create_block1' : different types for formal and actual parameter 3
f:\ug\list\list.c(77) : error C2275: 'uf_list_t' : illegal use of this type as an expression
        c:\program files\eds\unigraphics nx\ugopen\uf_defs.h(66) : see declaration of 'uf_list_t'
f:\ug\list\list.c(77) : error C2065: 'list' : undeclared identifier
f:\ug\list\list.c(79) : warning C4047: 'function' : 'struct uf_list_s ** ' differs in levels of indirection from 'int *'
f:\ug\list\list.c(79) : warning C4024: 'UF_MODL_create_list' : different types for formal and actual parameter 1
f:\ug\list\list.c(81) : warning C4047: 'function' : 'struct uf_list_s *' differs in levels of indirection from 'int '
f:\ug\list\list.c(81) : warning C4024: 'UF_MODL_put_list_item' : different types for formal and actual parameter 1
f:\ug\list\list.c(82) : warning C4047: 'function' : 'struct uf_list_s *' differs in levels of indirection from 'int '
f:\ug\list\list.c(82) : warning C4024: 'UF_MODL_put_list_item' : different types for formal and actual parameter 1
f:\ug\list\list.c(83) : error C2143: syntax error : missing ';' before 'type'
f:\ug\list\list.c(84) : error C2275: 'tag_t' : illegal use of this type as an expression
        c:\program files\eds\unigraphics nx\ugopen\uf_defs.h(52) : see declaration of 'tag_t'
f:\ug\list\list.c(84) : error C2146: syntax error : missing ';' before identifier 'list_item'
f:\ug\list\list.c(84) : error C2065: 'list_item' : undeclared identifier
f:\ug\list\list.c(85) : warning C4047: 'function' : 'struct uf_list_s *' differs in levels of indirection from 'int '
f:\ug\list\list.c(85) : warning C4024: 'UF_MODL_ask_list_count' : different types for formal and actual parameter 1
f:\ug\list\list.c(85) : error C2065: 'list_count' : undeclared identifier
f:\ug\list\list.c(86) : error C2143: syntax error : missing ';' before 'type'
f:\ug\list\list.c(86) : error C2143: syntax error : missing ';' before 'type'
f:\ug\list\list.c(86) : error C2143: syntax error : missing ')' before 'type'
f:\ug\list\list.c(86) : error C2143: syntax error : missing ';' before 'type'
f:\ug\list\list.c(86) : error C2065: 'i' : undeclared identifier
f:\ug\list\list.c(86) : warning C4552: '<' : operator has no effect; expected operator with side-effect
f:\ug\list\list.c(86) : error C2059: syntax error : ')'
f:\ug\list\list.c(87) : error C2143: syntax error : missing ';' before '{'
f:\ug\list\list.c(88) : warning C4047: 'function' : 'struct uf_list_s *' differs in levels of indirection from 'int '
f:\ug\list\list.c(88) : warning C4024: 'UF_MODL_ask_list_item' : different types for formal and actual parameter 1
f:\ug\list\list.c(93) : warning C4047: 'function' : 'struct uf_list_s ** ' differs in levels of indirection from 'int *'
f:\ug\list\list.c(93) : warning C4024: 'UF_MODL_delete_list_item' : different types for formal and actual parameter 1
f:\ug\list\list.c(96) : warning C4047: 'function' : 'struct uf_list_s *' differs in levels of indirection from 'int '
f:\ug\list\list.c(96) : warning C4024: 'UF_MODL_delete_feature' : different types for formal and actual parameter 1
f:\ug\list\list.c(100) : warning C4047: 'function' : 'struct uf_list_s ** ' differs in levels of indirection from 'int *'
f:\ug\list\list.c(100) : warning C4024: 'UF_MODL_delete_list' : different types for formal and actual parameter 1
Error executing cl.exe.
  
List.obj - 34 error(s), 25 warning(s)
12
发表于 2004-10-13 14:31:08 | 只看该作者
而将c文件改成cpp文件之后,出现了以下问题:Compiling...
List.cpp
Linking...
   Creating library Debug/List.lib and object Debug/List.exp
List.obj : error LNK2001: unresolved external symbol __imp__UF_terminate
List.obj : error LNK2001: unresolved external symbol __imp__UF_OBJ_delete_object
List.obj : error LNK2001: unresolved external symbol __imp__UF_MODL_delete_list
List.obj : error LNK2001: unresolved external symbol __imp__UF_MODL_update
List.obj : error LNK2001: unresolved external symbol __imp__UF_MODL_delete_feature
List.obj : error LNK2001: unresolved external symbol __imp__UF_MODL_delete_list_item
List.obj : error LNK2001: unresolved external symbol __imp__UF_DISP_set_highlight
List.obj : error LNK2001: unresolved external symbol __imp__UF_MODL_ask_list_item
List.obj : error LNK2001: unresolved external symbol __imp__UF_MODL_ask_list_count
List.obj : error LNK2001: unresolved external symbol __imp__UF_MODL_put_list_item
List.obj : error LNK2001: unresolved external symbol __imp__UF_MODL_create_list
List.obj : error LNK2001: unresolved external symbol __imp__UF_MODL_create_block1
List.obj : error LNK2001: unresolved external symbol __imp__UF_free
List.obj : error LNK2001: unresolved external symbol __imp__UF_MODL_delete_exp
List.obj : error LNK2001: unresolved external symbol __imp__UF_MODL_dissect_exp_string
List.obj : error LNK2001: unresolved external symbol __imp__UF_UI_write_listing_window
List.obj : error LNK2001: unresolved external symbol __imp__UF_UI_open_listing_window
List.obj : error LNK2001: unresolved external symbol __imp__UF_MODL_ask_exp_tag_string
List.obj : error LNK2001: unresolved external symbol __imp__UF_MODL_create_exp_tag
List.obj : error LNK2001: unresolved external symbol __imp__UF_initialize
LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/List.exe : fatal error LNK1120: 21 unresolved externals
Error executing link.exe.
  
List.exe - 22 error(s), 0 warning(s)
  
不知道为什么?
13
发表于 2004-10-13 14:40:40 | 只看该作者
没有添加libufun.lib和 libugopenint.lib到你的工程中去。
alt+f7,设置一下link项,。
14
发表于 2004-10-13 16:18:50 | 只看该作者
15
发表于 2004-10-13 21:02:09 | 只看该作者
但把两个lib加进去之后还是出现了上述的34个错误和25个警告,不知为什么
16
发表于 2004-10-14 09:06:54 | 只看该作者

要么看看zzz老大的“手把手教你二次开发”,要么把你的代码贴上来看看。
17
发表于 2004-10-14 15:28:55 | 只看该作者
代码和出现的错误都在上面的帖子里,请帮我看看是为什么?'UF_FEATURE_SIGN' : illegal use of this type as an expression  
        是怎么回事?
18
发表于 2004-10-14 15:51:44 | 只看该作者
你添加了libufun.lib 和libugopenint.lib,并且把.c改成了.cpp之后,那些错误不都是没有了?
你的错误应该不是代码的错误,是VC工程设置的问题。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3D打印手板模型快速制作服务,在线报价下单!

QQ 咨询|手机版|联系我们|iCAx开思网  

GMT+8, 2024-12-28 04:19 , Processed in 0.025292 second(s), 10 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

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