- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am relatively new to Fortran.
I am trying to compile several .for files into one .dll using a .bat (see attached).
previously i used to simply double click the .bat file and the .dll is generated. Now a black window popup and closes fast. Then by trying to force the run using oneAPI cmd the .dll does not work as supposed to be.
PS: i used the reguler cmd and and error appears always saying "ifort is not recognized as an internal or external command" although I have up to date Fortran compiler (classic and beta) from Intel oneAPI
Your help is highly appreciated
files are attached
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Several things here... First, you can't run a DLL - it's a library that is used by an EXE. Second, to use the compiler from a command prompt you must invoke the setvars.bat script found in C:\Program Files (x86)\Intel\oneAPI . This is done automatically by the shortcuts added to the start menu, but you can invoke it yourself, like this:
C:\Users\steve>C":\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64
Note this part of your .bat:
Here, it is assumed the environment is correctly set for 64-bit Intel(R) Visual Fortran compiler
If you just double-click on it, that won't happen. Add the line:\
call C":\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64
and it should work.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Several things here... First, you can't run a DLL - it's a library that is used by an EXE. Second, to use the compiler from a command prompt you must invoke the setvars.bat script found in C:\Program Files (x86)\Intel\oneAPI . This is done automatically by the shortcuts added to the start menu, but you can invoke it yourself, like this:
C:\Users\steve>C":\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64
Note this part of your .bat:
Here, it is assumed the environment is correctly set for 64-bit Intel(R) Visual Fortran compiler
If you just double-click on it, that won't happen. Add the line:\
call C":\Program Files (x86)\Intel\oneAPI\setvars.bat" intel64
and it should work.
- 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
It's odd that you didn't see any output from setvars.bat. Here's what it should look like:
What happens if do the "call" first?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Nothing is shown in both ways, I will uninstall and reinstall all oneAPI toolkits (Base and HPC) and will try once again
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Steve_Lionel I have uninstalled oneAPI Base and HPC and Fortran compiler, Then only installed the Fortran compiler,
and then followed the steps you provided. It worked perfectly! Thank you for your time!.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
For keywording " Plaxis " " compile " " soil mode " " udsm " " fortran " " .dll " " .for "
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Glad to hear it. An uninstall/reinstall seems to help a lot of problems with build environments.

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