From: Martin C. <cos...@wa...> - 2010-04-27 08:05:35
|
Alan wrote: > Hi there, > > I am trying to compile a program and bumping is this problem: > > Testing mixed C/Fortran compilation: > gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -c -o testp.c.o testp.c > gfortran -O0 -c -o testp.f.o testp.f > gcc -o testp testp.c.o testp.f.o -lgfortran -framework Accelerate > ld: library not found for -lgfortran > collect2: ld returned 1 exit status > ./configure: line 1057: ./testp: No such file or directory > WARNING: Unable to compile mixed C/Fortran code. 'gcc' is /usr/bin/gcc, which doesn't know where fink puts its libgfortran.dylib. So it is not surprising that it doesn't find it. > I do have gfortran and everything else from Fink, 64 bits, Mac OSX > 10.6.3. However I don't understand this: > > dpkg -l gfortran-shlibs > Desired=Unknown/Install/Remove/Purge/Hold > | Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed > |/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: > uppercase=bad) > ||/ Name Version Description > +++-=============================-=============================-========================================================================== > un gfortran-shlibs <none> (no > description available) This is because gfortran-shlibs is a virtual package, and dpkg doesn't really understand Fink's virtual packages. Try 'fink list gfortran-shlibs'. If it has a "p" in front, it is "provided". > I also know that probably my compilation should call gcc-4, however > where's gcc_select? Disappeared a couple of years ago. It also never concerned Fink's compilers. You need to call gcc-4 explicitly, or better do your linking with gfortran. Then you don't need -lgfortran. And you won't forget -lgfortranbegin. -- Martin |