Greetings,
I tried to follow a discussion between Rene Brun and smith277 on a thread:
http://root.cern.ch/phpBB2/viewtopic.php?t=814&highlight=trying+compile+ fortran+code
On my PC (windows xp), I have ROOT installed with the Windows Installer
Packages, Cygwin packages (g++, f77, etc.), Compaq Visual Fortran
(6.5), and Visual Studio .Net 2002(7.0).
In that thread, Rene Brun described the following procedure:
Create a small shared lib
g77 -c myf77.f
g++ -Wl,-soname,libmyf77.so -shared -o libmyf77.so myf77.o -lg2c
a simple C++ file myc2f77.C calling this f77 function
#define myf77 myf77_
extern "C" double myf77(int &arg1, double &arg2);
void myc2f77(int arg1, double arg2) {
double res = myf77(arg1,arg2);
printf("res=%g\n",res);
}
Now a simple ROOT session
root > gSystem->Load("libmyf77") root > .L myc2f77.C+ root > myc2f77(2,6) =======================================================================
I got the libmyf77.lib compiled successfully, but when I type in:
System->Load("libmyf77")
ROOT was complaining about not finding the library, which does exist in the working directory. The error is as following:
Error in <TWinNTSystem::DynamicPathName>: libmyf77 does not exist in
.;C:\root\/bin;C:\NuTCROOT\bin; C:\NuTCROOT\bin\X11;C:\NuTCROOT\mksnt;
C:\root\bin; C:\VSNET02\Common7\IDE; (...and a lot of other directories,
I took them out to shorten the message...) , or has wrong file extension
(.dll)
I guess this is due to some possible incompatible factors between my windows version of ROOT and g77 compiler. Could someone possibly help me out on this?
Thanks,
Weijun
This archive was generated by hypermail 2.2.0 : Mon Jan 01 2007 - 16:32:00 MET