|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
×
本帖最后由 清江 于 2014-11-20 10:45 编辑
2 H8 Z; x% {* v& Z) n
) j3 c; F, p& A. W; a9 z% X5 @问题已经解决,请看本帖第7楼!
( a0 f5 D' {: o' R( r* Z+ _, f- v- n; e0 n A6 V) u
我在做手工创建工程开发环境的练习时,按照课件中的方法进行了配置,并且复制了课件3文件中第6页的代码到VS2012中创建的WIN32项目里面,在调试代码的时候显示失败了,在代码里面也没有找到问题所在,不知是哪里出了问题。错误信息如下图:8 g' J( Z4 r A( b3 G9 I
7 X! |8 C' G4 Y# W
2 a# G) u+ z, W
- ]: y+ C) T# f7 s; k# L下面是全部的代码文件:7 M' t) L; [. b+ G
/* Include files */
. f u; r& \, J( a+ J o#include <uf_defs.h>. R7 }3 N: |0 E/ Z+ J4 o. U! M
#include <NXOpen/Session.hxx>$ B& G ]; t8 s }3 H
#include <uf.h>
$ e: a8 B7 C% k1 N#include <uf_ui.h>$ L# { Y" \6 b4 d
1 ~& G+ j0 h7 L2 x$ o3 J! Xusing namespace NXOpen;
# B9 m! T/ j# h2 v
) Z" }; i- k/ l, a, [; U// Explicit Activation
- s" r' F( o- F1 C8 y# l; |, r// This entry point is used to activate the application explicitly, as in 5 O, h5 V& l% M+ `2 ]( X& Y
// "File->Execute-> NX Open..." 7 S0 ?' G2 b; U: S! w# [
extern "C" DllExport void ufusr( char *parm, int *returnCode, int rlen ) _9 K, j% t$ B" r: V5 B+ B0 F3 m
{ 7 ^5 s9 ]9 w4 Q
/* TODO: Add your NXOpen application code here */; K( |; |3 y5 Z7 S) b b3 M
. `+ ` e3 Q6 z4 M$ ~$ e2 B! G uc1601("您好!欢迎您的到来。",1);
/ X' ]6 y- ?0 q; ? 4 A3 J0 U( E& s
5 t. l1 f- o- @+ i; l( T, \# ]
} & k) ]. _" i9 H" Q9 ]% M
//---------------------------------------------------------------------------
1 S5 m9 R& o0 g$ F( r' b// This method specifies how a shared image is unloaded from memory
' [/ Y$ X7 n6 s5 t// within NX. This method gives you the capability to unload an
: }' s$ b& u9 R, G// internal NX Open application or user exit from NX
3 h$ h/ |/ m8 D//--------------------------------------------------------------------------9 C6 _( F7 M3 }# }/ M
extern "C" DllExport int ufusr_ask_unload( void )
: T8 V- x; H9 v& Z$ r7 R6 T{
) J5 U0 M' E/ t( E//return (int)Session::LibraryUnloadOptionExplicitly; 9 x! B }! b8 C- g5 ]( P
return (int)Session::LibraryUnloadOptionImmediately; / p- p6 o& Q" o2 D6 E+ E) U: W5 x
//return (int)Session::LibraryUnloadOptionAtTermination; : t+ w: K$ | I; S2 E* q
}
# `. Q5 s8 L. z5 E, F( s2 t7 B
# L: P1 o4 N6 f8 Z8 I& |: [0 s9 F
- m' g4 J7 a" J3 l' S) l6 c0 c |
|