PLM之家PLMHome-国产软件践行者

[已解决] fatal error LNK1120: 6 个无法解析的外部命令怎么解决?

  [复制链接]

2017-12-7 09:09:42 9773 5

renie2015 发表于 2016-6-4 23:49:15 |阅读模式

renie2015 楼主

2016-6-4 23:49:15

请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!

您需要 登录 才可以下载或查看,没有账号?注册

x
完全按照NX9.0二次开发实例 6 使用NXOpen CPP创建圆柱.来做的。却出现了错误
1 R/ T2 T' r1 Y0 ^; A. O1>------ 已启动全部重新生成: 项目: NX9 Open Wizard1, 配置: DebUG x64 ------& b/ a$ V0 k- y8 X! y
1>cl : 命令行 warning D9038: 此平台上不支持 /ZI;请启用 /Zi
9 J4 q4 [" D% b  I9 V: X; P, x1>cl : 命令行 warning D9007: “/Gm”需要“/Zi”;选项被忽略
) y* Z2 M" S2 v$ @7 O3 s1>  NX9 Open Wizard1.cpp) k' ]6 ^& z& C% T5 E
1>     正在创建库 I:\ug\My_directory\visual studio 2012\NX9 Open Wizard1\x64\Debug\/NX9 Open Wizard1.lib 和对象 I:\ug\My_directory\visual studio 2012\NX9 Open Wizard1\x64\Debug\/NX9 Open Wizard1.exp; c$ U9 h4 \( X% M, L
1>NX9 Open Wizard1.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class NXOpen::Features::Feature * __cdecl NXOpen::Features::FeatureBuilder::CommitFeature(void)" (__imp_?CommitFeature@FeatureBuilder@Features@NXOpen@@QEAAPEAVFeature@23@XZ),该符号在函数 ufsta 中被引用
. s8 Z6 B( }2 X" X9 a1>NX9 Open Wizard1.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class NXOpen::Expression * __cdecl NXOpen::Features::CylinderBuilder:iameter(void)" (__imp_?Diameter@CylinderBuilder@Features@NXOpen@@QEAAPEAVExpression@3@XZ),该符号在函数 ufsta 中被引用
; L! E( t: Q" W6 e9 h$ s1>NX9 Open Wizard1.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class NXOpen::Expression * __cdecl NXOpen::Features::CylinderBuilder::Height(void)" (__imp_?Height@CylinderBuilder@Features@NXOpen@@QEAAPEAVExpression@3@XZ),该符号在函数 ufsta 中被引用/ A- v. J% X* L/ J/ z7 L! ]. Y2 S
1>NX9 Open Wizard1.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl NXOpen::Features::CylinderBuilder::SetOrigin(struct NXOpen:oint3d const &)" (__imp_?SetOrigin@CylinderBuilder@Features@NXOpen@@QEAAXAEBUPoint3d@3@@Z),该符号在函数 ufsta 中被引用
7 H' {$ A$ d- E1 e. a1>NX9 Open Wizard1.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: void __cdecl NXOpen::Features::CylinderBuilder::SetDirection(struct NXOpen::Vector3d const &)" (__imp_?SetDirection@CylinderBuilder@Features@NXOpen@@QEAAXAEBUVector3d@3@@Z),该符号在函数 ufsta 中被引用
  g* _* L7 G- S7 `1>NX9 Open Wizard1.obj : error LNK2019: 无法解析的外部符号 "__declspec(dllimport) public: class NXOpen::Features::CylinderBuilder * __cdecl NXOpen::Features::FeatureCollection::CreateCylinderBuilder(class NXOpen::Features::Feature *)" (__imp_?CreateCylinderBuilder@FeatureCollection@Features@NXOpen@@QEAAPEAVCylinderBuilder@23@PEAVFeature@23@@Z),该符号在函数 ufsta 中被引用
6 `. d  ^& b; n9 w1>I:\ug\My_directory\visual studio 2012\NX9 Open Wizard1\x64\Debug\/NX9 Open Wizard1.dll : fatal error LNK1120: 6 个无法解析的外部命令9 ~! Z$ n+ e+ |5 p" A
========== 全部重新生成: 成功 0 个,失败 1 个,跳过 0 个 ==========# N# J( Y3 _7 W

& U* _2 O1 T8 @% N
) A9 u' Z7 j+ a7 V8 S9 a7 S. E4 S8 M

+ a% ^' [* p3 {1 U( C& [6 T
; r# s  l6 D& M+ T+ T6 p
/ j' O+ m5 m( S, x" Q
我把开头的都加进来了
( ~- Z. i7 D  |2 r% y#if ! defined ( __hp9000s800 ) && ! defined ( __sgi ) && ! defined ( __sun )3 Q" s1 f6 F7 E& u
#   include <strstream>* n' F7 w3 n1 S6 m" O0 P$ O6 z
#   include <iostream>
/ d8 p) N$ b, [: w- ]    using std:strstream;
8 y) a; g" [/ ^! D4 D$ l# _    using std::endl;   
1 F3 D3 }+ o( A7 B% L# B7 K& P    using std::ends;" p5 g5 Y8 t4 U0 a& L9 f9 I
    using std::cerr;
+ f) P& V7 K% j, N* m2 ]#else/ v, k0 [! R4 z: G
#   include <strstream.h>
. l6 t% _% P" E! z2 D- N#   include <iostream.h>
# a' A% _1 _- X# t# t#endif1 w0 V7 T8 h" J# i  f, w8 d4 @
#include <uf.h>
/ a1 s  N& |$ g& f. E" U# `+ G0 T#include <uf_ui.h>
  }" G: c2 l6 X/ c) _  p#include <uf_exit.h>
/ h+ H; t+ r/ W3 M. T# h#include <uf_defs.h>5 z/ c! {. Z! x$ I. g) ]+ J0 F# E
#include <NXOpen/NXException.hxx>
% a( ^7 f3 G1 Y( g. s! y#include <NXOpen/Session.hxx>
; Y; `+ j2 I- K. z8 r8 b- D8 W- q0 q' w#include <NXOpen/Axis.hxx>( P; `) f6 g, J) N( d
#include <NXOpen/BasePart.hxx>' t: L6 D% o; c# [1 X
#include <NXOpen/Body.hxx>
7 H/ o- k7 i' L7 N5 [' `9 t#include <NXOpen/Builder.hxx>
6 Q$ {$ ?: W3 k+ R: G7 h3 x#include <NXOpen/Direction.hxx>
7 |/ r% C1 `+ M" h#include <NXOpen/DirectionCollection.hxx>
2 V) w5 \  b6 s8 w8 l#include <NXOpen/Expression.hxx>8 m! G+ y0 {/ ]* q8 a
#include <NXOpen/ExpressionCollection.hxx>, X: R( h" S. Q+ ^7 ?, B% F) |
#include <NXOpen/Features_CylinderBuilder.hxx>
6 ^/ c- J1 M2 A#include <NXOpen/Features_FeatureCollection.hxx>! g3 z  b9 A8 `! Z3 w
#include <NXOpen/GeometricUtilities_BooleanOperation.hxx>. O# v7 o8 X, `: }$ Z
#include <NXOpen/NXObject.hxx>
0 w1 T+ r/ X# m; q1 d" z#include <NXOpen/Part.hxx>
2 @. ~! T6 F" ?& K9 ~  q1 R7 J/ ]#include <NXOpen/ParTCollection.hxx>. [! U5 `5 o0 p
#include <NXOpen/Point.hxx>
' s7 y7 |. @# x2 l# [#include <NXOpen/PointCollection.hxx>
! {8 y5 z5 Q: {/ o7 d# Q. s#include <NXOpen/Preferences_PartModeling.hxx>
: I+ x6 }+ U2 k, x# W- q" s/ {#include <NXOpen/Preferences_PartPreferences.hxx>! b& |' H, M  o, A* f. O
#include <NXOpen/Scalar.hxx>
$ I% }; n  f+ Y! `#include <NXOpen/ScalarCollection.hxx>
- A% j5 a1 B- P2 D% n  E: }; w/ V4 w; g#include <NXOpen/SelectICurve.hxx>: ]. G) _2 a) r# b
#include <NXOpen/SelectObject.hxx>
" `0 c- N: x2 n9 c) A#include <NXOpen/Session.hxx>
, f; h4 K5 ]. U  v$ P#include <NXOpen/TaggedObject.hxx>* X7 }6 _+ [- ?
#include <NXOpen/Unit.hxx>9 i1 J8 I8 a6 ]7 f6 Z
00.jpg * p0 ]/ p( ~% y9 D" x: G! k
我点代码的时候还有定义啊 9 x+ H4 {- h3 R  R  U
+ w: G6 ~% e# k$ ~: k" V6 N9 F
这个到底该怎么解决啊 0 E: A5 M6 }, x
' {4 l' t% `% B, O. ?' j
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复

使用道具 举报

全部回复5

admin 发表于 2016-6-5 07:25:30

admin 沙发

2016-6-5 07:25:30

库不全,加其他的库
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复 支持 反对

使用道具 举报

renie2015 发表于 2016-6-5 09:45:22

renie2015 板凳

2016-6-5 09:45:22

所有都加进去啊?
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复 支持 反对

使用道具 举报

renie2015 发表于 2016-6-5 09:58:38

renie2015 地板

2016-6-5 09:58:38

按照大哥所说的。。成功了。。我把所有的库都加进去了libufun.lib, k( o4 ~  _5 @
libufun_cae.lib; m+ m7 q: }4 _% T
libnxopencpp.lib
- k3 h( q9 W( ?libugopenint.lib
: k: }3 a. F' O7 z- N. t1 Z: Nlibugopenint_cae.lib" P) @# g: Z7 m* e" G. _' b% R" A. f4 V
libnxopenuicpp.lib
& u5 E$ ?) L1 I1 C/ alibvmathpp.lib& n. E, w2 A, ?8 a( c6 y8 }
libugopenint_cae.lib5 W4 f2 z2 c4 s) y( ?+ f% R
libugopenint.lib
' j( A8 z! u# K& c' k5 A  A2 A8 alibufun_cae.lib
, X( Q! V$ L1 jlibufun.lib0 r- o; B( y3 [+ x" y
libopenpp.lib8 @- A. i3 W0 K$ H- R4 b$ T! K' ]
libopenintpp.lib: D( Y9 W7 D2 ?: y9 W. d% e
libnxopenuicpp.lib
( K) M. X, F# p8 [- wlibnxopencpp_weld.lib
& T7 X2 ?2 m$ c. x/ u% G+ |# t+ s4 Ilibnxopencpp_visualreporting.lib4 ]& D% Z2 M  N* S
libnxopencpp_validate.lib) n6 U# D. x# o4 x  D
libnxopencpp_userdefinedobjects.lib/ R& K/ `* J" X) T# j
libnxopencpp_tooling.lib
' B) x4 f4 c7 Plibnxopencpp_sim.lib
) Q7 {0 s2 b/ e7 f. [! elibnxopencpp_sheetmetal.lib
* F- U) d" P& I+ e$ vlibnxopencpp_shapesearch.lib
# O$ i% l/ ]( }; \5 S' K% Zlibnxopencpp_routing.lib: l3 U* A- R- [6 H% O  [
libnxopencpp_preferences.lib
* y( E9 [8 j8 j8 Y( dlibnxopencpp_positioning.lib
, l5 U. A; L3 xlibnxopencpp_physmat.lib- v# V% `* Y1 y- _* x8 ]9 n
libnxopencpp_pdm.lib
7 B! Z/ e! g* W# _libnxopencpp_partfamily.lib
: d  b& A* ~% Zlibnxopencpp_options.lib( i, P: ]: u8 f, s
libnxopencpp_optimization.lib
/ H3 t% B6 w0 |0 Glibnxopencpp_motion.lib& j' I0 z, w# c% {7 ?
libnxopencpp_modldirect.lib
7 x) m4 ]: g  w! f# e" Zlibnxopencpp_mechatronics.lib
1 |1 I: G1 d9 b1 c; E" L% ^$ blibnxopencpp_layout2d.lib
' |5 }: H1 g* Y9 Y' z. p' Zlibnxopencpp_layer.lib
) p1 m+ m% Q8 [* P! v+ I% B" X6 _% ulibnxopencpp_issue.lib5 G5 D. P  ], U" [
libnxopencpp_geometricutilities.lib! u, P; K/ d9 [8 E- B  l
libnxopencpp_geometricanalysis.lib0 f2 S9 w- \$ n2 G) h: e% L* ~
libnxopencpp_gateway.lib
% X+ u& d& E+ E9 ?9 Ulibnxopencpp_formboard.lib
; `% _# `6 n) T6 I. O) mlibnxopencpp_fields.lib. V/ J) l- [3 X7 ?% E5 t) c7 @: I
libnxopencpp_features.lib
2 W3 N8 {* l( I( r/ \3 Dlibnxopencpp_facet.lib) X. V" A8 p1 e* [( a
libnxopencpp_drawings.lib
2 W' m& p. K% b, I- w$ Rlibnxopencpp_drafting.lib
3 R4 N# s. R8 k9 k: X' k* r7 Tlibnxopencpp_display.lib 1 V2 v: J! }: B" B  t7 L/ R1 G' a
libnxopencpp_die.lib
' ~1 C' e5 r, B$ D4 H  t4 Olibnxopencpp_cam.lib
" \; X5 N# e- m1 e. mlibnxopencpp_cae.lib
* H: |0 c" l, q" i" Y+ Hlibnxopencpp_bodydes.lib- v/ p) y) q& Z6 j0 i: C3 ^
libnxopencpp_assemblies.lib" p  o3 n, I( M1 ?& ]
libnxopencpp_annotations.lib
5 V: _% |" }( E; ]" m4 `, glibnxopencpp.lib
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复 支持 反对

使用道具 举报

KutouAi 发表于 2017-12-6 22:29:43

KutouAi 5#

2017-12-6 22:29:43

专门申请了个账号来感谢楼主以及管理员。这个问题困扰了我好几天了。之前一直死扣dll连接的问题,以为引用4个基本的dll就够了,没想到是因为没引用全。终于解决了哈哈。
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复 支持 反对

使用道具 举报

admin 发表于 2017-12-7 09:09:42

admin 6#

2017-12-7 09:09:42

KutouAi 发表于 2017-12-6 14:29
' e% \7 q3 X" S7 ?: K专门申请了个账号来感谢楼主以及管理员。这个问题困扰了我好几天了。之前一直死扣dll连接的问题,以为引用4 ...
* K0 r/ C& U" d5 w7 d5 w
这是基本的问题,很常见,看看视频,一劳永逸的方法就是全加进去
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复 支持 反对

使用道具 举报

发表回复

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

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了