Use C++ dll in ARX

Use C++ dll in ARX

Rakusiri
Explorer Explorer
612 Views
4 Replies
Message 1 of 5

Use C++ dll in ARX

Rakusiri
Explorer
Explorer

I am stuck and need some help. I create a windows dll project with an exported method. Method does nothing but simply returns an int. Now when I create a ARX project and add this dll's path to the ARX's library directories, everything compiles great. However, when I load the ARX in AutoCAD, I get the following error

 

 

 

c:\users\rakusiri\source\repos\arxproject1\x64\release\adskarxproject1.arx cannot find a procedure that it needs.
AcRxDynamicLinker failed to load 'c:\users\rakusiri\source\repos\arxproject1\x64\release\adskarxproject1.arx'
c:\users\rakusiri\source\repos\arxproject1\x64\release\adskarxproject1.arxUnable to load ADSKArxProject1.arx file.

 

 

 

I have spend 2 days but can't get it to work. Can anyone please guide me. I am attaching  the project and the ARX and DLL therein.

 

Karl

0 Likes
Accepted solutions (2)
613 Views
4 Replies
Replies (4)
Message 2 of 5

daniel_cadext
Advisor
Advisor
Accepted solution

you can try adding the path to the DLL to "PATH" environment

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

Alexander.Rivilis
Mentor
Mentor
Accepted solution

http://otb.manusoft.com/2013/01/using-delayload-to-specify-dependent-dll-path.htm

https://adndevblog.typepad.com/autocad/2013/01/avoid-module-loading-issues-with-dbx-enablers.html

Hope your dll-file was compiled and linked with the same options as main arx-file.

Відповідь корисна? Клікніть на "ВПОДОБАЙКУ" цім повідомленням! | Do you find the posts helpful? "LIKE" these posts!
Находите сообщения полезными? Поставьте "НРАВИТСЯ" этим сообщениям!
На ваше запитання відповіли? Натисніть кнопку "ПРИЙНЯТИ РІШЕННЯ" | Have your question been answered successfully? Click "ACCEPT SOLUTION" button.
На ваш вопрос успешно ответили? Нажмите кнопку "УТВЕРДИТЬ РЕШЕНИЕ"


Alexander Rivilis / Александр Ривилис / Олександр Рівіліс
Programmer & Teacher & Helper / Программист - Учитель - Помощник / Програміст - вчитель - помічник
Facebook | Twitter | LinkedIn
Expert Elite Member

0 Likes
Message 4 of 5

Rakusiri
Explorer
Explorer

Thanks @daniel_cadext. That did the trick.

Message 5 of 5

Rakusiri
Explorer
Explorer

Thanks @Alexander.Rivilis I was making a static dll and that was causing the issue. Per your comment I matched the configuration to ARX project and then applied @daniel_cadext 's approach. That fixed everything. Thank you both.

0 Likes