Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28445 Discussions

Error message "Unsupported 16-bit Application"

Phyo
Novice
1,144 Views

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.

0 Kudos
1 Solution
mecej4
Honored Contributor III
1,115 Views

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.

View solution in original post

4 Replies
mecej4
Honored Contributor III
1,116 Views

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.

Phyo
Novice
1,068 Views

Thank you for  your comment. It helped me learn.

0 Kudos
jimdempseyatthecove
Honored Contributor III
1,106 Views

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

Phyo
Novice
1,067 Views

Thanks for the comment and links, Jim. I have got to learn.

0 Kudos
Reply