Error: Linker Tools Error LNK 2019

Error: Linker Tools Error LNK 2019

humamalhusaini
Explorer Explorer
359 Views
1 Reply
Message 1 of 2

Error: Linker Tools Error LNK 2019

humamalhusaini
Explorer
Explorer

Summary:

I’m trying to follow the Setting up a project in Microsoft Visual Studio part of the ObjectArx docs. It does have some minor mistakes that I was able to fix myself, but LNK 2019 is an ambiguous error. It does have good documentation here which I used to attempt to diagnose the error but to no avail.

Steps to Reproduce:
I have Visual Studio 2019 16.11 and .NET 4.8 in a windows VM. I set the application type to DLL.

  In the Configuration Properties -> VC++ Directories

  • I added inc directory to include directories
  • I added lib 64 directory to library directories
  1. Set the runtime library Multithreaded DLL for all configs
  2. I didn’t fix the compiler warning 4311 as it’s not relevant.
  3. Set the output file name to $(OutDir)$(TargetName).arx
  4. Put rxapi.lib and acdb25.lib in Configuration Properties -> Linker -> Input -> Additional Directories
  5. Copied the “minimum code to make an ARX program” in the docs. Modified it as acutPrintf does not take char, it takes achar.
  6. Created a def file and also copied the minimum from the docs. Replaced the "objectarx_program_name.arx" with “Test.arx” as that is the output file name.


Expected Behavior:

I expect to be able to build the solution with no errors

 

Current Behavior:

I am getting a LINK 2019 error on arcxUnlockApplication, arcxRegisterAppMDIAware and acutPrintf.

What I’ve tried:

I used the diagnostic tools in the docs. They were inconclusive as to what the error was, but they were able to help me verify that the libraries are included in my build and that the functions are in those libraries and are being exported. The MS docs recommend to use vcpkg for third party libraries, so it could help to make a vcpkg version of the ObjectARX SDK.

0 Likes
Accepted solutions (1)
360 Views
1 Reply
Reply (1)
Message 2 of 2

daniel_cadext
Advisor
Advisor
Accepted solution

I didn’t think that old style entrypoint still worked, you should use the ARX wizard to generate the project for you

 

Python for AutoCAD, Python wrappers for ARX https://github.com/CEXT-Dan/PyRx
0 Likes