- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is a VS IDE question.
I am working on a console application that is somehow connected to several other fortran dll's. If any of the dll files are missing, the console app will not run. I can't figure out where in the source code (of the console app) on where in its project settings that the names of the other dll files are specified. Where do I look for this?
Thanks,
Brian in Austin, Texas
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This is not in the source or the project settings. When running applications, DLLs are loaded according to Windows' default search rules, which include:
- Current directory
- Directory containing the EXE (not the DLL)
- PATH environment variable
There is no control over this from Visual Studio.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Let me give an example. There is a dll named FEM_IMPEDANCE.DLL, and the console app will run if this file is in the same folder as the exe, but won't run if it's missing. Why would the console app think it needs this dll? I cannot find the name of this dll anywhere throughout the project of the console app.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nevermind. I think I found it. In the project explorer there is an item (I think it's a folder) named Linked Library Files, and under that there is a list of *.lib files that seem to correspond to the list of dlls I was looking for.
So if I wanted to remove one of these from the project, I would just delete it from the list. The next rebuild would then probably tell me if something was needed, like an unresolved external thing for a missing subroutine?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to send a screen dump image with a forum posting?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, that doesn't help. You have found a list of the DLL export libraries the application links against, but this has no bearing on where the DLLs load from when the program runs.
The best way to include a screen capture is to use a service such as imgur.com to upload a capture and then use the "picture" button here to insert the picture. You can also attach a .jpg or .bmp file when posting here, but you can't insert it inline until after you submit the post (and the re-edit).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The console app seems to always be looking for them in the same folder as itself. That is good, and I don't want to change it. I would like to know the meaning of the red dot, or lack of it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you mean the red dot in Solution Explorer for the icon on a file, it means that you have overridden project settings for that file.
All applications will look for DLLs in the same folder as the EXE. That is the second place looked for, after the current default folder (which in Visual Studio is the project folder.)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm still trying to get my arms around this project, but I am getting there.
In that "Linked Library Files" list of *.lib's, for all except one, each has a corresponding .dll file of the same name that needs to be present for the .exe to run. The dll for the one outlier doesn't need to be present for the .exe to run.
Would this be due to the .exe not containing any calls to any routines in that one? Or might there be some other reason? I'm trying to figure out if it is obsolete, and can be safely removed.
This particular console app has about a 25 year history, and has been worked on by quite a few folks, most of whom were graduate students who are long gone.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Right - assuming those are all export libraries, if your program makes no calls to routines in that last library then the DLL will not be pulled in at run-time. You can generate a link map and see if any symbols were resolved in that library, and can also use DependencyWalker to see which DLLs your program references.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the Dependency walker. It's a terrific help in understanding what is in a project.
I did the /MAP and re-link. The map file is pretty long, but string searching for ".dll" seems to home in on the relevant information.
After more poking around, it looks like some Preprocessor Definitions are used to turn some things on and off. The need for that outlier dll might be buried in there. So I've got more digging to do.
Thanks,
Brian

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