0

I am trying to compile a C++ program which invokes the ARPACK library.

My problem is that when everything is linked, some of the symbols in the ARPACK library do not get resolved. They are

__gfortran_transfer_integer   
__gfortran_transfer_character  
__gfortran_transfer_complex   
__gfortran_compare_string  
__gfortran_st_write_done  
__gfortran_st_write  
__gfortran_transfer_real  
__gfortran_transfer_array 

I did a brute force search on my lib directory, and found no library which provided all of these symbols. A couple of them are provided by libf77blas, and it looks like g95 has some similar symbols (with gfortran replaced by g95), but I am at a complete loss as to what else I might need to install. I am compiling my code with

g++-mp-4.5 -O3 -Wall -Wl,-search_paths_first -headerpad_max_install_names my.o -o my.out -L/opt/local/lib -larpack -lm -L/opt/local/lib -lgsl -lgslcblas -lm -lf77blas -llapack -larpack -lqblas -lsquack

and /opt/local/lib actually has all the libraries I reference.

Has anyone run into this problem, or can point to the solution?

Marcus P S
  • 871
  • 10
  • 16

1 Answers1

1

add to linker -lgfortran .................

Anycorn
  • 50,217
  • 42
  • 167
  • 261
  • Thanks! It works. But no `libgfortran` exists in my MacPorts library directory (`/opt/local/lib`). I looked for it, and since it was not there, I was looking for the port that provided this file, and could not find it. Still have no clue where that library is ... but it apparently is somewhere in my library path. – Marcus P S Feb 18 '11 at 21:52