Opennurbs Link Error

Hi guys,

I use Visual studio 2017. The codes are built ok with 2015. I use static lib. Does anyone know how I could fix this issue

Thank you.
Eric

However, it has link error:

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol __imp__calloc_dbg referenced in function “char * __cdecl std::_Maklocstr(char const *,char *,struct _Cvtvec const &)” (??_Maklocstr@D@std@@YAPEADPEBDPEADAEBU_Cvtvec@@@Z) IntelliUnfoldProject 2019 C:\tech78\vs2017\arxProject 2019\IntelliUnfold\IntelliUnfold\src\opennurbs_public_staticlib.lib(opennurbs_precompiledheader.obj) 1 Severity Code Description Project File Line Suppression State Error LNK2019 unresolved external symbol __imp__invalid_parameter referenced in function "void * __cdecl std::_Allocate_manually_vector_aligned<struct std::_Default_allocate_traits>(unsigned __int64)" (??_Allocate_manually_vector_aligned@U_Default_allocate_traits@std@@@std@@YAPEAX_K@Z) IntelliUnfoldProject 2019 C:\tech78\vs2017\arxProject 2019\IntelliUnfold\IntelliUnfold\src\opennurbs_public_staticlib.lib(opennurbs_bezier.obj) 1

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol __imp__CrtDbgReportW referenced in function “void * __cdecl std::_Allocate_manually_vector_aligned(unsigned __int64)” (??$_Allocate_manually_vector_aligned@U_Default_allocate_traits@std@@@std@@YAPEAX_K@Z) IntelliUnfoldProject 2019 C:\tech78\vs2017\arxProject 2019\IntelliUnfold\IntelliUnfold\src\opennurbs_public_staticlib.lib(opennurbs_bezier.obj) 1

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol __imp__free_dbg referenced in function “public: static void __cdecl std::_Fac_node::operator delete(void *)” (??3_Fac_node@std@@SAXPEAX@Z) IntelliUnfoldProject 2019 C:\tech78\vs2017\arxProject 2019\IntelliUnfold\IntelliUnfold\src\msvcprtd.lib(locale0_implib.obj) 1

Hi @renyu_teng,

What verison of openNURBS are you using? I cannot tell if you are having problem building openNURBS or you solution that uses openNURBS? Can you clarify?

– Dale

Hi Dale,

Thank you for your reply. I use the latest version downloaded from the web: opennurbs_6.1.18014.22401.

Regards
Eric

If I use the old version: opennurbs_20130711

Then I got the following error:

1>msvcprtd.lib(locale0_implib.obj) : error LNK2019: unresolved external symbol __imp__free_dbg referenced in function “public: static void __cdecl std::_Fac_node::operator delete(void *)” (??3_Fac_node@std@@SAXPEAX@Z)
1>msvcprtd.lib(locale0_implib.obj) : error LNK2019: unresolved external symbol __imp__malloc_dbg referenced in function “public: static void * __cdecl std::_Fac_node::operator new(unsigned __int64)” (??2_Fac_node@std@@SAPEAX_K@Z)

Hi @renyu_teng,

With openNURBS 6, and using Visual Studio 2017, you should be able to open opennurbs_public.sln and build all configurations and platforms without error.

If you cannot, then you may not have all of the necessary C/C++ components installed. In this case, you should re-run the Visual Studio installer and add what you are missing.

– Dale

thank you. I will revisit this issue again, but now the release build is good, and I can build the release version and it is good enough for me for now.

thank you again.
Regards
Eric