Creating - Fortran 77 dll for use in Visual Basic 6.0 (not using Compaq Visual Fortran) 
Author Message
 Creating - Fortran 77 dll for use in Visual Basic 6.0 (not using Compaq Visual Fortran)

   Are there any instructions available for using freely available fortran
compilers (Cygwin, Delorie, Salford, etc?) to create a dll from Fortran
subroutines for use in Microsoft Visual Basic?  Are there any simple
tutorials on how to create a very simple dll from a Fortran subroutine
(calculate the SIN of an angle, and return the value), and how to call this
from a simple program in MSVB6?
    I would like to take the program below and make it into a Visual Basic
program, as a stepping point in a more ambitous project.

      program vfang
        implicit none
        double precision xinput
        double precision output

        print*,'Enter Angle to calculate SIN of'
        read(5,*)xinput
        call DegreeSin (xinput,output)
        print*,'The SIN of ', xinput,' is ', output
      stop
      end

        subroutine DegreeSin(xinput, output)
        implicit none
        double precision xinput
        double precision output
         output = SIN(xinput)
        return
        end

Thanks in advance for any suggestions...

Mike



Wed, 26 May 2004 03:26:45 GMT  
 Creating - Fortran 77 dll for use in Visual Basic 6.0 (not using Compaq Visual Fortran)


Quote:
>   Are there any instructions available for using freely available fortran
>compilers (Cygwin, Delorie, Salford, etc?) to create a dll from Fortran
>subroutines for use in Microsoft Visual Basic?  Are there any simple
>tutorials on how to create a very simple dll from a Fortran subroutine

You can do this with the Salford FTN77.  There is an example of how to
do this in the knowledge base SKB0002 at
http://www.salfordsoftware.co.uk/support/compilers/kb/index.shtml.

Regards,
Mark
--
       |\      _,,,---,,_          Love may come and go
ZZZzzz /,`.-'`'    -.  ;-;;,       but chocolate is forever
      |,4-  ) )-,_. ,\ (  `'-'    
     '---''(_/--'  `-'\_)          

Mark Stevens                          www.thepcsite.co.uk



Wed, 26 May 2004 22:32:03 GMT  
 Creating - Fortran 77 dll for use in Visual Basic 6.0 (not using Compaq Visual Fortran)

Quote:



> >   Are there any instructions available for using freely available fortran
> >compilers (Cygwin, Delorie, Salford, etc?) to create a dll from Fortran
> >subroutines for use in Microsoft Visual Basic?  Are there any simple
> >tutorials on how to create a very simple dll from a Fortran subroutine

> You can do this with the Salford FTN77.  There is an example of how to
> do this in the knowledge base SKB0002 at
> http://www.salfordsoftware.co.uk/support/compilers/kb/index.shtml.

> Regards,
> Mark

It is also available with Cygwin & g77 - check the FAQ on how to create DLLs.


Thu, 27 May 2004 06:15:31 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Question on using Compaq Visual FORTRAN with Microsoft Visual C++ 6.0

2. Building DLLs with Compaq Visual Fortran and Intel Visual Fortran

3. Calling Fortran 77 dll's from Visual Basic under Excel

4. Fortran 77, DLLs, Visual Basic ?

5. Creating libraries in Compaq Visual Fortran 6.0

6. Variable exchange in Visual Basic 6.0 and Visual Fortran 5.0

7. Calling Fortran DLL in VIsual Basic 6.0

8. compag visual fortran dll callable from visual basic 6

9. Writing to mat (MATLAB) files using Compaq Visual Fortran compiler

10. include header in f90 file using compaq visual fortran

11. Using a Visual Basic dll in clarion4

12. Linking Compaq Visual Fortran 6.0 with Mingw C ?

 

 
Powered by phpBB® Forum Software