-
Using a Fortran .lib
Hi,
Someone gave me a Fortran .lib file which contain functions I need to use in a C++ program.
How should I do that ?
Let's say for instance I want to call a function called "SquareRoot".
(I'm using Eclipse (Wascana) under windows, with GNU C++ compiler)
Cheers.
-
This page has the usual method for *nix systems. That may or may not work for you, depending on how the .lib file was made.
-
What 'flavour' of Fortran is it? f77 or?
-
And was the Fortran library compiled using the GNU Fortran compiler?
-
Unfortunately, I can't be sure about any oh those right now.
Isn't possible to use them without knowing how they were made ?
I'd assume it's F77.
-
> Isn't possible to use them without knowing how they were made ?
Possibly, but it certainly raises the bar a lot.
Calling conventions, symbol decorations etc all have to be "hacked" in some way if all the libraries are not compiled with the same tool chain.