Belial
Belial

Reputation: 21

Trying to run Fortran executable but get the error "The version of this file is not compatible with the version of Windows you're running..."

The error

The version of this file is not compatible with the version of Windows you're running. Check your computer's system information to see whether you need an x86 (32-bit) or x64 (64-bit) version of the program, and then contact the software publisher.

appears whenever I attempt to run a program that I created with Fortran.

The code was made and compiled in a 64-bit version of Linux Mint with GFortran and I am trying to run it on a PC with 64-bit Windows 7.

I have already tried to make the program run with WoW64 but it unfortunately hasn't helped.

Upvotes: 2

Views: 1187

Answers (2)

jladan
jladan

Reputation: 837

Windows and Linux use different binary (executable) formats, and have different system libraries, etc. The easiest and most reliable solution would be to install gfortran on your Windows PC, and compile it on that computer.

Upvotes: 3

SomeWittyUsername
SomeWittyUsername

Reputation: 18358

Linux compiler will create a Linux executable which isn't compatible with Windows. You need a cross compiler to generate executable for a platform different than the one you use to compile. Check the options of your compiler to see if it's supported.

Upvotes: 0

Related Questions