-
SymptomThis type of situation was not meant to occur anymore as of blueCFD-Core 2.3-1, but this symptom could occur after adding another application to the The symptom usually is to have an application crash right after launching it, when running the command from the blueCFD-Core (MSys2) terminal. Possibly it might give a dialogue window with the error message stating that something is wrong with the loaded DLL. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
ReasonThe reason is why there is a page titled DLL Hell on Wikipedia. The problem arises when there are two or more DLL files with the same exact name that are available on the search path, namely inside in one of the paths listed in the environment variable Solution
DiagnosisFirst we need to diagnose which library is failing, if there is no indication of which exact library is failing. Therefore, start a new blueCFD-Core (or MSys2) terminal and run the following command: But replace the name Which should give a list similar to the following: From this list, the entries Next, we will check where the library
This example output should not be a problem when running OpenFOAM applications such as
Details about those two other paths:
The main reason why both Gnuplot and Geany work without problems is because the respective DLL files are inside the same folder as the application itself, as shown when the Therefore everything is OK in this case. But lets check the more probable point of failure: with which DLL files does the main libOpenFOAM.dll` library link to? To check this, run: Which should give this: Among which the Which may give something like this: As already described for the other example, the last 3 are all in the same folder as the respective applications, therefore it should not affect the applications built with blueCFD-Core's software stack and port of OpenFOAM for Windows. However, if for some strange reason the two first entries were swapped around: Then this could lead to With blueCFD-Core 2.3-1, 2016-1 and newer versions, this should never happen. Side note for searching DLL filesThere are situations where the MSys/MSys2 terminal will not launch properly or load the OpenFOAM shell environment, due precisely to DLL conflicts. In such scenarios, it might be necessary to launch a Windows Command Line by running: In this mode, it should still possible to search for DLLs with either one of the following commands (examples are for the DLL file The last command will only return the first occurrence. Removing from the search path
IsolationIt is detailed in the FAQ entry How to install additional software, such as Gmsh, that a shell script file is meant to be created at To this: Where:
Start a new terminal after editing the file and it should work as intended! |
Beta Was this translation helpful? Give feedback.
Reason
The reason is why there is a page titled DLL Hell on Wikipedia.
The problem arises when there are two or more DLL files with the same exact name that are available on the search path, namely inside in one of the paths listed in the environment variable
PATH.Solution
First we should diagnose which DLL file is having the problem and where it is located, as documented in subsection Diagnosis.
We try to remove or isolate the location of that DLL file, as documented in subsections:
Diagnosis
First we need to diagnose which library is failing, if there is no indication of which exact library is failing.
Therefore, start a new blueCFD-Core …