|
Re: Problems to link C++ files to a Fortran 77 file: msg#00201gcc.help
From Gustavo, I bet that all the "API" routines that interface between both FORTRAN and I thought that too. but the the define __g77_integer is declared nowhere. I ran grep under the instalation directory. On the C++ side, you'll need to make sure the header file has .... Yes there are those ifdefs and defines. Note: you won't be able to pass std::cout to FORTRAN routines to utilize... In fact, what I want is to pass symbolsfrom FORTRAN to C++. The name of the routine in FORTRAN is zgees. This function is called by my program in the function main in the file mom.cpp. Zgees has some FORTRAN intrisic routines such as: abort, write and abs. I also compiled with an array bound check option, which adds another function of the FORTRAN's library: _s_rnge. The second problem is: If I link with gcc (or g++), FORTRAN's intrisic functions are not collected. There is no mangling problem because I checked out the names in the object file (zgee.o) and in the archive (libg2c.a). And I saw they match exactly. On the other hand if I link with g77, as the manual suggests, then the g77 collecter doesn't find intrisic symbols of C++. Again there´s no mangling problem, I checked out for myself the symbols in the object file, mom.o and in the archive file, libstdc++.a If I further force to link, using ld. The results are the same, even if I tell ld to include the right archives, libg2c.a and libstdc++.a. My gcc version is 3.2 released in 27/09/2003. So what is the problem? Thanks, Gustavo. |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Problems to link C++ files to a Fortran 77 file: 00201, Eljay Love-Jensen |
|---|---|
| Next by Date: | Re: Problems to link C++ files to a Fortran 77 file: 00201, Eljay Love-Jensen |
| Previous by Thread: | Re: Problems to link C++ files to a Fortran 77 filei: 00201, Eljay Love-Jensen |
| Next by Thread: | Re: Problems to link C++ files to a Fortran 77 file: 00201, Eljay Love-Jensen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |