sunt05
sunt05

Reputation: 119

Compiled executable causes "exec format error" at run-time

I have a Fortran project which is cross-platform based and can be successfully compiled under Windows (tested with Win7 32bit and Win10 64bit) by gfortran (tested with 4.9 and 5.3). However, the compiled executable cannot run and gives "Exec format error" whenever executed.

I also used file to check the compiled version and the result does show something like "PE32 executable (console) Intel 80386, for MS Windows".

The program can be successfully compiled and executed under Linux and Mac.

So, what is the problem?

Upvotes: 0

Views: 703

Answers (1)

sunt05
sunt05

Reputation: 119

We just located the problem, which turned out to be the limitation in the total size of static arrays specific to Windows (tested with Win7 32bit and Win10 64bit).

When we reduced the sizes of those arrays, the program could run happily.

Upvotes: 0

Related Questions