UG 8.0及后续版本使用NX Open出现链接LNK2019错误

当用NXOpen写的程序在UG 8.0上编译链接时出现LNK2019的错误时,查看UG帮助文档,

UG帮助文档给的提示是:

When you perform linking in a C++ project, you need to include all of the library files. Due to the continuous addition of JA functions, the libnxopencpp library was reaching its physical limit, so it is split into multiple libraries. The libraries are based on the namespaces available. There are currently 35 different namespaces in NX Open, so 35 new libraries are added. Each library name starts with libnxopoencpp.

You need to refer to all of the libraries when building a new NX Open C++ application and incorporate the new library files into your existing C++ projects when modifying those.

Note

Only linking is affected. The compilation process for NX Open programs remains the same.

The NX Open C++ wizard and uflink script are updated for the new libraries.

翻译过来后大意就是说NXOPEN 的Lib又加了35个,所以需要自己在原来的程序里加上这些Lib,如下(包括原来本身就有的Lib):

libufun.lib
libnxopencpp.lib
libnxopencpp_annotations.lib
libnxopencpp_assemblies.lib
libnxopencpp_bodydes.lib
libnxopencpp_cae.lib
libnxopencpp_cam.lib
libnxopencpp_die.lib
libnxopencpp_display.lib
libnxopencpp_drafting.lib
libnxopencpp_drawings.lib
libnxopencpp_facet.lib
libnxopencpp_features.lib
libnxopencpp_fields.lib
libnxopencpp_formboard.lib
libnxopencpp_gateway.lib
libnxopencpp_geometricanalysis.lib
libnxopencpp_geometricutilities.lib
libnxopencpp_layer.lib
libnxopencpp_mechatronics.lib
libnxopencpp_modldirect.lib
libnxopencpp_motion.lib
libnxopencpp_optimization.lib
libnxopencpp_options.lib
libnxopencpp_pdm.lib
libnxopencpp_physmat.lib
libnxopencpp_positioning.lib
libnxopencpp_preferences.lib
libnxopencpp_routing.lib
libnxopencpp_shapesearch.lib
libnxopencpp_sheetmetal.lib
libnxopencpp_sim.lib
libnxopencpp_tooling.lib
libnxopencpp_userdefinedobjects.lib
libnxopencpp_validate.lib
libnxopencpp_visualreporting.lib
libnxopencpp_weld.lib
libugopenint.lib
libnxopenuicpp.lib

或者可以用visual studio配合UG 8 的Open C++ 向导生成工程,向导会自动加上这些lib

猜你喜欢

转载自blog.csdn.net/hustoysj/article/details/17060311