- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am developing an application that uses many DLLs (Qt and VTK). When I invoke the program from within VS, all works fine. When I double-click on the .exe file, it fails because it finds the wrong QtCore4.dll - there are several on my machine, associated with different software (e.g. Matlab).
When I execute the program within a command window, I can control the DLLs that are found by setting environment variables appropriately. What is the recommended way to achieve this when running the program from the Windows GUI?
When I execute the program within a command window, I can control the DLLs that are found by setting environment variables appropriately. What is the recommended way to achieve this when running the program from the Windows GUI?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You may write a .bat file which including the environment setting and the call to your exe, theninvoke the bat file from windows GUI.
Or you can set upthe properenvironment variables in the system environment variable settings.
Thanks.
-Yang
Or you can set upthe properenvironment variables in the system environment variable settings.
Thanks.
-Yang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I forgot about the bat file option.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page