|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
82. NX二次开发编译报错:error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public:
7 L) u. H3 l. d% f5 M$ w
F# ^6 S3 M3 w- T6 O4 Z' j
. u7 _8 u0 [3 y: G6 y4 ]情景描述:; m6 x4 b2 U- M# G% r& v; N0 b
我们在创建和编译链接的时候已经添加了库:) |2 i4 c0 \( S3 }/ c! Q* q7 ]
libufun.lib; w) r. h$ ^" X6 d
libUGopenint.lib& D' `5 F& y7 d) F/ u. F5 J
libnxopencpp.lib
2 W) o$ {* w' i! x. [% Hlibnxopenuicpp.lib9 h$ Y7 r5 `& s; I+ T
+ H1 o9 H& z) D2 s0 ^) L7 B$ I8 d' r; M8 a% ^: S6 W
错误如下:
" a5 k0 G9 N' F J% U' f
7 F( g2 g1 P+ ], G$ W- N1>------ 已启动生成: 项目: plmhomeToolKits, 配置: Debug x64 ------/ j; \+ S- @/ o- u5 d- y
1> 正在创建库 C:\PLMHomeToolkits\plmhomeToolKits\x64\Debug\/plmhomeToolKits.lib 和对象 C:\PLMHomeToolkits\plmhomeToolKits\x64\Debug\/plmhomeToolKits.exp
% Y' `" g& h& r) `4 m1>plmhomeToolkits_splitProduct.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl NXOpen::Assemblies::CreateNewComponentBuilder::SetDefiningObjectsAdded(bool)" (__imp_?SetDefiningObjectsAdded@CreateNewComponentBuilder@Assemblies@NXOpen@@QEAAX_N@Z),该符号在函数 "public: int __cdecl plmhomeToolKits_splitProduct::createNewComponent(void)" (?createNewComponent@plmhomeToolKits_splitProduct@@QEAAHXZ) 中被引用* S4 c0 |, v5 R3 s: `
1>plmhomeToolkits_splitProduct.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl NXOpen::Assemblies::CreateNewComponentBuilder::SetNewComponentName(class NXOpen::NXString const &)" (__imp_?SetNewComponentName@CreateNewComponentBuilder@Assemblies@NXOpen@@QEAAXAEBVNXString@3@@Z),该符号在函数 "public: int __cdecl plmhomeToolKits_splitProduct::createNewComponent(void)" (?createNewComponent@plmhomeToolKits_splitProduct@@QEAAHXZ) 中被引用
% ]3 ?! N' R( ~- ~# F( i1 s2 u) `1>plmhomeToolkits_splitProduct.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl NXOpen::Assemblies::CreateNewComponentBuilder::SetReferenceSet(enum NXOpen::Assemblies::CreateNewComponentBuilder::ComponentReferenceSetType)" (__imp_?SetReferenceSet@CreateNewComponentBuilder@Assemblies@NXOpen@@QEAAXW4ComponentReferenceSetType@123@@Z),该符号在函数 "public: int __cdecl plmhomeToolKits_splitProduct::createNewComponent(void)" (?createNewComponent@plmhomeToolKits_splitProduct@@QEAAHXZ) 中被引用
8 b2 ]1 e0 u7 x( v6 L1>plmhomeToolkits_splitProduct.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl NXOpen::Assemblies::CreateNewComponentBuilder::SetReferenceSetName(class NXOpen::NXString const &)" (__imp_?SetReferenceSetName@CreateNewComponentBuilder@Assemblies@NXOpen@@QEAAXAEBVNXString@3@@Z),该符号在函数 "public: int __cdecl plmhomeToolKits_splitProduct::createNewComponent(void)" (?createNewComponent@plmhomeToolKits_splitProduct@@QEAAHXZ) 中被引用
, W+ g9 k$ E9 j1 @5 m1>plmhomeToolkits_splitProduct.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl NXOpen::Assemblies::CreateNewComponentBuilder::SetLayerOption(enum NXOpen::Assemblies::CreateNewComponentBuilder::ComponentLayerOptionType)" (__imp_?SetLayerOption@CreateNewComponentBuilder@Assemblies@NXOpen@@QEAAXW4ComponentLayerOptionType@123@@Z),该符号在函数 "public: int __cdecl plmhomeToolKits_splitProduct::createNewComponent(void)" (?createNewComponent@plmhomeToolKits_splitProduct@@QEAAHXZ) 中被引用: ?2 Z5 w/ `4 A* @9 e" F; g
1>plmhomeToolkits_splitProduct.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl NXOpen::Assemblies::CreateNewComponentBuilder::SetLayerNumber(int)" (__imp_?SetLayerNumber@CreateNewComponentBuilder@Assemblies@NXOpen@@QEAAXH@Z),该符号在函数 "public: int __cdecl plmhomeToolKits_splitProduct::createNewComponent(void)" (?createNewComponent@plmhomeToolKits_splitProduct@@QEAAHXZ) 中被引用
8 q, D7 z, f5 a: q2 |( T2 c1>plmhomeToolkits_splitProduct.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl NXOpen::Assemblies::CreateNewComponentBuilder::SeTComponentOrigin(enum NXOpen::Assemblies::CreateNewComponentBuilder::ComponentOriginType)" (__imp_?SetComponentOrigin@CreateNewComponentBuilder@Assemblies@NXOpen@@QEAAXW4ComponentOriginType@123@@Z),该符号在函数 "public: int __cdecl plmhomeToolKits_splitProduct::createNewComponent(void)" (?createNewComponent@plmhomeToolKits_splitProduct@@QEAAHXZ) 中被引用5 n8 F) J6 I9 P$ g! h( n) ^
1>plmhomeToolkits_splitProduct.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl NXOpen::Assemblies::CreateNewComponentBuilder::SetNewFile(class NXOpen::FileNew *)" (__imp_?SetNewFile@CreateNewComponentBuilder@Assemblies@NXOpen@@QEAAXPEAVFileNew@3@@Z),该符号在函数 "public: int __cdecl plmhomeToolKits_splitProduct::createNewComponent(void)" (?createNewComponent@plmhomeToolKits_splitProduct@@QEAAHXZ) 中被引用& x3 O( `8 n$ i# Z/ }0 T
1>plmhomeToolkits_splitProduct.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class NXOpen::Assemblies::CreateNewComponentBuilder * __cdecl NXOpen::Assemblies::AssemblyManager::CreateNewComponentBuilder(void)" (__imp_?CreateNewComponentBuilder@AssemblyManager@Assemblies@NXOpen@@QEAAPEAV023@XZ),该符号在函数 "public: int __cdecl plmhomeToolKits_splitProduct::createNewComponent(void)" (?createNewComponent@plmhomeToolKits_splitProduct@@QEAAHXZ) 中被引用( s# W* U( S) T/ `* D
1>C:\PLMHomeToolkits\plmhomeToolKits\x64\Debug\\plmhomeToolKits.dll : fatal error LNK1120: 9 个无法解析的外部命令
7 R3 @7 b* {# G========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========) `2 D- f2 n8 K+ ? q. g
& g1 D0 g9 ~' A q7 c7 D1 d5 w" i
解决方案:
; F/ R; R) ~+ N% G# r8 r* J2 y% N
; z! s1 ~ E* w$ O+ y; P
7 e. H4 v, a3 h9 V* P6 a$ }
$ B2 W( o( n" [; @" J1 r5 q |
|