July 30th, 2003


It works!

So, along with my new office computer, I got various compilers -- specifically, Intel Fortran 7.1 for Fortran programs, and Microsoft Visual Studio 2003 for C programs (and because the Fortran compiler depends on its linker). This is the first time I've used an IDE of any seriousness since an ancient version of Visual Basic; up to now, all my Fortran programming has been using G77 from the command line.

Anyhow, today I decided to figure out how to make all this work and do useful stuff. Project 1, namely compiling an existing code, was quite simple and I didn't really learn much from it. So, project 2 was more complicated: writing a simple code that had a main program in Fortran that called a function written in C. A couple of hours of poking at various online and offline documentation, and it works -- the C compiles into a static library, the Fortran compiles into a program, the linker links them together, and it all runs. Yay!

(Actually, that couple of hours also includes writing down how to do it so that I can do it easily next time.)
  • Current Mood