Occurrence:
This error message is returned when I run the Extended Euler Solutions (EXEULER.GX) on the Pdepth menu:
"Can't load nga_ee.dll for function derrive(). Possible Matlab runtime error: are the libraries correctly installed and on the path?" and "Check path to MatLab dll's".
Resolution:
Run Mglinstaller
- Close Oasis montaj.
- Create a new folder on your C drive called c:\matlabinstaller.
- Download mglinstaller.exe.
- Copy mglinstaller.exe to c:\matlabinstaller.
- Run mglinstaller.exe from the new folder.
- When prompted to enter a path enter the following path and press Enter:
Pre v9.0:
C:\Program Files (x86)\Geosoft\Matlab
C:\Program Files (x86)\Geosoft\Matlab
Post version 9.0:
C:\Program Files\Geosoft\Matlab
Set Environment Variables
- Open the Windows Control Panel and click System.
- Click Advanced system settings and from the Advanced tab select Environment Variables.
- Under User variable for user name, click New.
- Enter the Variable name: Path.
- Enter the Variable value:
Pre v9.0:
C:\Program Files (x86)\Geosoft\Matlab\bin\win32;C:\Program Files (x86)\Geosoft\Desktop Applications 9\bin
Post version 9.0:
C:\Program Files\Geosoft\Matlab\bin\win32;C:\Program Files\Geosoft\Desktop Applications 9\bin
- If you already have a Path variable, edit it and add the Variable value above at the end of the existing Variable value. Ensure there is a ; separating different paths.
- Click OK on Edit User Variable dialog and OK on Environment Variables dialog.
- Launch Oasis montaj and run exeuler.gx again.
NOTE: if you are using Windows 8 or 10, you must restart your computer and then run exeuler.gx again.
To check the user variable "Path" is set correctly:
- Start a command prompt.
- At the prompt, type echo %path%.
- You should see:
C:\Program Files (x86)\Geosoft\Matlab\bin\win32 as one of the variable values.
If you have other applications that use Matlab:
The nga_ee.dll is dependent on a particular version of the Matlab runtime libraries. It must find those libraries on the system path before it finds different versions of the runtime libraries.
These batch files change the system PATH environment variable. You only need to run one of the batch files depending whether your computer is 32 bit or 64 bit. The batch file will put our Matlab runtime at the front of the path. This is only true for the process running Oasis montaj, so it won't affect other applications that may depend on the other versions of the Matlab runtime.
- Change this line in the batch file to match where you have our runtime installed:
set MATLAB_RUNTIME=C:\Program Files (x86)\Geosoft\Matlab\bin\win32 - Running the batch file (after making the changes in step 1 above) should allow you to run exeuler.gx.
Root Cause
Due to Matlab licensing restrictions, mglinstaller.exe must be installed separately from Oasis montaj.
Notes:
- If you are using a 32 bit computer the file path will be C:\Program Files\Geosoft\...\...
- If you are using Windows 8 you must restart your computer after you follow the steps available in this article to apply the modifications on your system.
- For versions between 7.1 and 8.0 the path value you should enter is C:\Program Files (x86)\Geosoft\Matlab\bin\win32 (64-bit machine) or C:\Program Files\Geosoft\Matlab\bin\win32 (32-bit machine)
- Prior to version 7.1, there was a conflict with a specific DLL shared between UX Analyze and ExEuler. Please update to the most current version of Oasis montaj if you have not done so already, then follow the steps outlined in this Article.
- A Depth to Basement license is required to run the Extended Euler Solutions.
- The mglinstaller.exe can also be found in the \extrainstalls\MATLAB folder of the installation DVD.