cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X

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

DomenicLaritz
16-Pearl

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

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

1 ACCEPTED SOLUTION

Accepted Solutions
RPN
17-Peridot
17-Peridot
(To:DomenicLaritz)

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.

View solution in original post

7 REPLIES 7
RPN
17-Peridot
17-Peridot
(To:DomenicLaritz)

You may check this

There is also a dependencies walker.

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

RPN
17-Peridot
17-Peridot
(To:YaroslavSin)

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 😅

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.


@DomenicLaritz wrote:

Now, in my opinion, it would be nice if you didn't have to additionally extend the PATH environment variable


Yes, it is good opinion. But, I don't know any alternatives ways for Toolkit apps.

 

Looks like @RPN trying to explain for us something. But I don't understand how to use posted information in MS web site 😁.

RPN
17-Peridot
17-Peridot
(To:DomenicLaritz)

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.

That's how I'm doing it at the moment.
The disadvantage I see in this approach is that you must not forget to adjust the PSF file if the folder name of the Toolkit app ever changes.
This happens a lot with my Toolkit apps because I usually include the version number of the app in the folder name.
Therefore, I would have been comfortable if the Toolkit DLL primarily just looks in the same directory for the rest of the dependencies.

Top Tags