>on the search for tools for converting Fortran programs
>to C I ran into your site. Unfortunately, I have only
>little experience with C. For this reason I did not
>succeed to build exe-files from the converted programs
>(MSDEV, MSVC++) yet. I am interested  very much to know
>which changes of f2c or of the header file or of the
>libraries must be carried out to convert my Fortran
>sources successfully. I would be happy very much about
>an answer of you.

OK. Here is how it works with MSVC++2 :

  1- Copy the package at :
         http://fluo.univ-lemans.fr:8001/f2cmsvc2.zip

  2 - Unzip this file, you will get :
            f2c.exe     executable for DOS
            f2c.h       header
            libi77.lib  library specific to MSVC++2
            libf77.lib            ,,
            readme.txt  this file

      You should get the f2c manual from the f2c authors
      (make a search on Altavista in order to find them,
       if you are here, you probably have yet the manual..)

  3 - Have a Fortran code, say, name.f
  
  4 - Translate your code into C with f2c. This should be done in a
        DOS box. Type :
        f2c -A -w name.f

  5 - You must have a directory named msvc20, with subdirectories
       include and lib. You should put the header f2c.h into
       mscv20\include
       and put the libraries libi77.lib and libf77.lib into
       msvc20\lib

  6 - Now, if you have successfully obtained name.c from name.f
        by applying f2c (some special Fortran code may not pass),
        then start MSVC++2
  
  7 - Click on file, click on open, go to the directory where
        name.c is stored, select name.c and click on OK

  8 - Go to project, click and then click on 'build name.exe'.
        The program says 'this build command requires an active
         project.....' click on OK

  9 - The compilation starts with defaults values and will fail
        with 20 errors or so. This is because you need now to
        inform the program about f2c.h and the libraries.

  10 - Click on project
          Click on Files
            A box is open, select the directory msvc20\include
            and modify the 'List file of type' in order to make
            appear the .h extension
            Select f2c.h and then click on Add at the bottom-right
            of the box.  The f2c.h should have been added to name.c
            now. Click on close.

    11 - return to projects and click, then click on settings, a box
           is opened in which you will click on link, and then you will
           add manually in the Object Library Modules the 2 files :
           libi77.lib libf77.lib
           each library module should be separated by a blank from
           the others.
           Then, click on Win32 Release if you wish not to debug
           and click on OK

    12 -  In the small box 'target', you may also select Win32 Release

    13 - Return to 'project', click, and then click on 'rebuild all'

    14 - This time the compilation should work fine. To recompile
            if you modify further your program, you will have to
            click on name.mak for recompilation.

     Hope this help,

     Armel Le Bail   armel@fluo.univ-lemans.fr


