I am trying to call a fortran subroutine from
my windows c++ builder6 c++ code. I compiled
the fortran code with cygwin's g77 compiler, -c,
to give me a .o file. I added the fortran.o to
my "project". Then, I TRYED to put an extern C
dcl in for the fortran function, thinking I'd link
with g2c in C++. PROBLEMS
1. WHERE does the extern C go? Before WinMain()
and there are 89 regular C++ members not found
2. In some locations, this extern causes only
one error "my_fortran_fun_() not found" in the
link stage.
DOES ANYBODY KNOW HOW TO GET THE C++ TO CALL
THE FORTRAN CODE CORRECTLY. Borland says I shouldn't
even need to link a special library (like g2c) but if
I did, WHERE WOULD I ADD the -lg2c.
HELP leading to a solution would be rewarded with
gold bricks, if I had any...
my windows c++ builder6 c++ code. I compiled
the fortran code with cygwin's g77 compiler, -c,
to give me a .o file. I added the fortran.o to
my "project". Then, I TRYED to put an extern C
dcl in for the fortran function, thinking I'd link
with g2c in C++. PROBLEMS
1. WHERE does the extern C go? Before WinMain()
and there are 89 regular C++ members not found
2. In some locations, this extern causes only
one error "my_fortran_fun_() not found" in the
link stage.
DOES ANYBODY KNOW HOW TO GET THE C++ TO CALL
THE FORTRAN CODE CORRECTLY. Borland says I shouldn't
even need to link a special library (like g2c) but if
I did, WHERE WOULD I ADD the -lg2c.
HELP leading to a solution would be rewarded with
gold bricks, if I had any...