- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am having that error message when I run the .exe file on windows.
I compiled the fortran file on Linux using the command, ifort file.f -o file.exe. I checked the version of compiler used, "/opt/intel/compilers_and_libraries_2020.1.217/linux/bin/intel64/ifort". It is sure that I used intel64 (version 2020). And then, I downloaded the .exe file and run it on the windows.
My PC is 64bit. When I run the .exe file, I got the above error message. May I know why this problem occurred and how can I fix this?
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot run an ELF executable on Windows unless you have a Linux subsystem installed and functioning. Conversely, you cannot run a Windows PE32 or PE32+ EXE on Linux without a Windows subsystem (Wine, a VM, etc.) installed and functioning.
Merely naming an ELF file with the suffix "EXE" does not make the file an EXE file, just as renaming a text file with the suffix "PDF" file does not make the file a PDF file.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You cannot run an ELF executable on Windows unless you have a Linux subsystem installed and functioning. Conversely, you cannot run a Windows PE32 or PE32+ EXE on Linux without a Windows subsystem (Wine, a VM, etc.) installed and functioning.
Merely naming an ELF file with the suffix "EXE" does not make the file an EXE file, just as renaming a text file with the suffix "PDF" file does not make the file a PDF file.
- 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
You cannot compile and link a Fortran file on Linux then run it on Windows. The executable formats are different, and both rely on shared libraries from their respective systems.
You will need to compile and link on Windows.
Alternatively, each system supports a virtual environment for the other, then in a limited way, support running as the other's system.
Example Wine
to run Windows applications on Linux
And Windows Subsystem for Linux to run Linux on Windows
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for the comment and links, Jim. I have got to learn.

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