在 OSX 上将我的代码与 ARPACK 链接时出现问题(使用 MacPorts for ARPACK)
我正在尝试编译一个调用 ARPACK 库的 C++ 程序。
我的问题是,当所有内容都链接时,ARPACK 库中的某些符号无法解析。我
__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
对我的 lib 目录进行了强力搜索,发现没有提供所有这些符号的库。其中一些是由 libf77blas
提供的,看起来 g95
有一些类似的符号(用 g95
替换了 gfortran
) code>),但我完全不知道还需要安装什么。 编译我的代码
我正在使用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
和 /opt/local/lib
实际上拥有我引用的所有库。
有谁遇到过这个问题,或者可以指出解决方案吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
添加到链接器
-lgfortran
.................add to linker
-lgfortran
.................