Skip to main content
DomenicLaritz
16-Pearl
October 24, 2023
Solved

Dependency of the Toolkit DLL on other DLLs (e.g. open source libraries)

  • October 24, 2023
  • 2 replies
  • 3274 views

Hello dear community members,

 

how do you deal with the fact that the toolkit DLLs you compile depend on other DLLs (e.g. any open source libraries)?
As far as I know, the additional DLLs are only found when starting the auxiliary application in Creo if they are located in the Creo startup directory or a directory of the PATH environment variable.
Or do you know a way for Creo to find the additional DLLs even if they are in the same directory as the Toolkit DLL itself?

 

Thanks and regards,
Domenic

Best answer by RPN

I use only the extend of the PATH var. For a user it is not allowed to change the PATH var. But if you have other dependencies, it may not so easy to copy this DLL's just to your Toolkit DLL folder, because this DLL's may depend on other DLL's as well. PTC is doing this in the PSF file. So I would use this technic as well.

 

Just modify the PSF in the same way.

Here one line of the PTC psf (ProEngineer Startup File)

This statement will add a new path for dynamic loading of PTC's DLL's. 

ENV=PATH+=%PRO_DIRECTORY%\%PRO_MACHINE_TYPE%\deflib

I do not copy my required DLL's, because this is more effort. This is a simple way of doing.

I hope that helps to solve your issue.

2 replies

18-Opal
October 25, 2023

You may check this

There is also a dependencies walker.

17-Peridot
October 26, 2023

I'm setup the PATH environment variable. Why is not suitable for you?

18-Opal
October 26, 2023

Maybe I misunderstood your question 🙋 

 

Here is more

https://learn.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order

 

If you didn’t read this already 😅

DomenicLaritz
16-Pearl
October 27, 2023

Usually you install Toolkit apps by referring to the protk.dat or creotk.dat of the app in the config.pro.
And in the *.dat file again the path to the Toolkit DLL is noted.
That's all you need to install a Toolkit app.

 

If you now deliver a Toolkit app that requires other (e.g. open source) DLLs in addition to the Toolkit DLL, all DLLs are conveniently located in the same directory.
Now, in my opinion, it would be nice if you didn't have to additionally extend the PATH environment variable to install the Toolkit app, but the fact that all DLLs are in the same directory would be sufficient.