Free Program for Compiling Windows Executables from Fortran77 Files

Click For Summary

Discussion Overview

The discussion revolves around compiling Fortran77 files into Windows executables, specifically focusing on the use of free tools and the integration of resource and library files. Participants explore various methods and tools available for achieving this compilation on a Windows 7 operating system.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Experimental/applied

Main Points Raised

  • One participant inquires about free programs to compile Fortran77 files into Windows executables, mentioning the need for specific resource and library files.
  • Another participant suggests using the gfortran compiler, prompting further discussion about its capabilities.
  • A participant shares their experience with gfortran under Cygwin and mentions the availability of binary builds for Windows.
  • Concerns are raised about linking a Windows library file (.lib) with gfortran, which typically expects a Unix-style library file (.a), leading to questions about whether renaming the file would suffice or if conversion is necessary.
  • Discussion includes the need to convert a .res file into a .rc file and then into an object file using windres.exe, with participants questioning the feasibility of this approach.
  • A participant outlines their compilation process using gfortran, detailing the steps taken to produce object files and link them, while noting issues with the resulting application freezing and the absence of the resource dialog.
  • Questions arise regarding the necessity of different library files and whether the renamed library file might be causing the application to malfunction.

Areas of Agreement / Disagreement

Participants express varying levels of experience with gfortran and its capabilities, but there is no consensus on the best approach to resolve the linking issues or the specific requirements for the library and resource files.

Contextual Notes

Participants mention specific file formats and conversion processes, but there are unresolved questions about the compatibility of library files and the correct handling of resource files. The discussion does not clarify the necessary steps to ensure successful compilation and execution.

Who May Find This Useful

This discussion may be useful for individuals looking to compile Fortran77 programs into Windows executables, particularly those interested in using free tools and navigating library and resource file integration.

Ambrus
Messages
4
Reaction score
0
Hi!

I would like to compile some *.for files (only standard Fortran77 statements) which only contains some subroutines and functions and link them with a *.res resource file and a *.lib library file (supplied by developers) into a windows executable.


Is there any FREE program to achieve this?



Some detail:
-My operating system is Windows7
-Previously I used the the trial version of an Intel program and it worked.
-The *.exe I'm trying to recreate meant to be a modified version of an existing windows program, so that's why I need the *.res and the *.lib files.

Thans for the answer!
 
Technology news on Phys.org
Did you look up the gfortran compiler?
 
No, not yet.
Do you have experience with compiling windows executables in gfortran?
 
Well, I somtimes used gfortran under cygwin. There are also binary builds of the compiler around for windows, so it should be easy to try them out.
 
I installed gfortran and tried it on some small programs.
Now I would like to link my library file, and resouce file with my object files.
So about the library:
It only accepts files with a name like: libfilename.a (like in unix) and I have a filename.lib (windows). Is changeing the filename enough, or should i convert it somehow?
About the .res file:
On other forums they told me I should convert my filename.res into a filename.rc file, then with windres.exe convert that into an object file.
Do you think that could work?
 
So I'm using gfortran:
-compile with gfortran.exe with the -c option to prooduce .o files
-convert the .res resource file into an object file (.o) with res2coff.exe
-use ld.exe to link the object files mentioned above and MY library file, and some other library files too provided by gfortran

Now I can produce a windows application, but it needs some .dll in the same directory. So I put them together but it freezes when I try to run it, and the dialog from the resource file doesn't appear at all.

Should I use other library files?
Is MY renamed library file the one which causes the problem?
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 27 ·
Replies
27
Views
7K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 2 ·
Replies
2
Views
12K
  • · Replies 13 ·
Replies
13
Views
6K
  • · Replies 6 ·
Replies
6
Views
6K