Author Topic: Compiling a .NET wrapper in VS Getting errors with C++ portion  (Read 2604 times)

0 Members and 1 Guest are viewing this topic.

sdunn

  • Newt
  • Posts: 74
Compiling a .NET wrapper in VS Getting errors with C++ portion
« on: January 28, 2021, 01:01:49 PM »
I am trying to compile a wrapper for tool palette code for use with .NET.  I am using a demo project from the Acad Dev Blog https://adndevblog.typepad.com/autocad/2013/06/working-with-toolpalette-groups-using-net.html

I am using Visual Studio 2017 and the 2020 SDK.  I updated the references that pointed to the old SDK and can get all of the error flags resolved in the editor, but when I try to build the C++ .dll, I get several LNK2019 and LNK2001 errors below.  I can't find the reference CAdUiPathname anywhere in the project or in the SDK.  I am not familiar with C++ and just OK with Visual Studio.  Does anyone have any ideas on where to start?

Thank you,
Stacy


1>TpWrapper.obj : error LNK2028: unresolved token (0A0001A1) "public: virtual __cdecl CAdUiPathname::~CAdUiPathname(void)" (??1CAdUiPathname@@$$FUEAA@XZ) referenced in function "public: virtual void * __cdecl CAdUiPathname::`vector deleting destructor'(unsigned int)" (??_ECAdUiPathname@@$$FUEAAPEAXI@Z)
1>TpWrapper.obj : error LNK2028: unresolved token (0A0001A2) "protected: virtual void __cdecl CAdUiPathname::AssignCopy(class CAdUiPathname const &)" (?AssignCopy@CAdUiPathname@@$$FMEAAXAEBV1@@Z) referenced in function "public: __cdecl CAdUiPathname::CAdUiPathname(class CAdUiPathname const &)" (??0CAdUiPathname@@$$FQEAA@AEBV0@@Z)
1>TpWrapper.obj : error LNK2001: unresolved external symbol "public: virtual enum PathErr __cdecl CAdUiPathname::Parse(wchar_t const *,bool)" (?Parse@CAdUiPathname@@UEAA?AW4PathErr@@PEB_W_N@Z)
1>TpWrapper.obj : error LNK2001: unresolved external symbol "protected: virtual void __cdecl CAdUiPathname::AssignCopy(class CAdUiPathname const &)" (?AssignCopy@CAdUiPathname@@MEAAXAEBV1@@Z)
1>TpWrapper.obj : error LNK2019: unresolved external symbol "protected: virtual void __cdecl CAdUiPathname::AssignCopy(class CAdUiPathname const &)" (?AssignCopy@CAdUiPathname@@$$FMEAAXAEBV1@@Z) referenced in function "public: __cdecl CAdUiPathname::CAdUiPathname(class CAdUiPathname const &)" (??0CAdUiPathname@@$$FQEAA@AEBV0@@Z)
1>TpWrapper.obj : error LNK2019: unresolved external symbol "public: virtual __cdecl CAdUiPathname::~CAdUiPathname(void)" (??1CAdUiPathname@@$$FUEAA@XZ) referenced in function "public: virtual void * __cdecl CAdUiPathname::`vector deleting destructor'(unsigned int)" (??_ECAdUiPathname@@$$FUEAAPEAXI@Z)
1>C:\Users\stacy.dunn\Dropbox\VS Projects\Projects\ToolPalettes\x64\Debug\ToolPaletteWrapperDemo.dll : fatal error LNK1120: 6 unresolved external

It's Alive!

  • Retired
  • Needs a day job
  • Posts: 7163
  • AKA Daniel
Re: Compiling a .NET wrapper in VS Getting errors with C++ portion
« Reply #1 on: January 28, 2021, 04:52:20 PM »
it could be the project is referencing adui19.lib,  for the 2020 SDK, it should be adui32.lib



Retired

sdunn

  • Newt
  • Posts: 74
Re: Compiling a .NET wrapper in VS Getting errors with C++ portion
« Reply #2 on: January 29, 2021, 02:54:58 PM »
Thank you for responding. 

After downloading the project, I went through and changed all of the old refences tied to the SDK and VS.  I checked the project is is referencing adui23.lib.  Do you have any other suggestions?

Thank you,
Stacy




It's Alive!

  • Retired
  • Needs a day job
  • Posts: 7163
  • AKA Daniel
Re: Compiling a .NET wrapper in VS Getting errors with C++ portion
« Reply #3 on: January 30, 2021, 05:27:47 AM »
try adding  ac1st23.lib
Retired

sdunn

  • Newt
  • Posts: 74
Re: Compiling a .NET wrapper in VS Getting errors with C++ portion
« Reply #4 on: February 01, 2021, 11:32:44 AM »
That was it!  Thank you for you help.