GCC 生成的 Dll 与 Intel Visual Fortran 不兼容?
我在Windows平台上使用gcc将一些fortran源文件编译为*.lib
和*.dll
,使用最新版本的mingw 。使用的gcc是版本3。输出的结果是arpack_win32.dll
、blas_win32.dll
和lapack_win32.dll
。
然后我想针对 sssimp.f 进行编译使用 适用于 Windows 的英特尔 Visual Fortran 编译器,因为 sssimp.f
使用这些 dll。但我得到了印象(来自英特尔支持论坛 )这是不可能的。
我的印象正确吗?或者是只要我可以生成底层的库和 dll(无论使用哪个编译器以及它有多旧),我就可以将它们用作我的基础库和 dll,并且我可以从任何现代或老,编译器?
I used gcc to compile a few fortran source files into *.lib
and *.dll
on Windows platform, using the latest version of mingw . The gcc used is version 3. The result of the output is arpack_win32.dll
, blas_win32.dll
and lapack_win32.dll
.
I then want to compile sssimp.f against the arpack_win32.dll
, blas_win32.dll
and lapack_win32.dll
using Intel visual fortran compiler for Windows, because sssimp.f
uses those dlls. But I got the impression ( from Intel support forum) that this is not possible.
Is my impression correct? Or is it that as long as I can produce the underlying libs and dlls ( no matter in which compiler and how old it is), I can use them as my base libs and dlls, and I can link to them from any, modern or old, compiler?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
是的,g77 使用与 IVF 不同的 ABI。因此,除非 IVF 有一些 g77/f2c 兼容性选项,否则它不会起作用。
对您来说最简单的解决方案可能也是使用 IVF 来编译库。
g77 uses a different ABI than IVF, yes. So unless IVF has some g77/f2c compatibility option it's not going to work.
The easiest solution for you is probably to use IVF to compile the libraries too.
正如已经指出的,混合具有不同调用约定的编译器可能非常困难。
英特尔论坛上的答案指出了 arpack 翻译为 Fortran 90 的版本 - http://people.sc.fsu.edu/~burkardt/f_src/arpack/arpack.html - 你可以使用它吗?另请参阅 http://people.sc.fsu.edu/~ burkardt/f_src/lapack/lapack.html 和 http ://people.sc.fsu.edu/~burkardt/f_src/blas1_s/blas1_s.html
或者 Intel Visual Fortran 应该能够使用合适的编译器选项编译 Fortran 77。它拒绝什么语言构造?
As already pointed out, mixing compilers with different calling conventions is likely to be very difficult.
That answer on the Intel Forum pointed out a version of arpack translated to Fortran 90 -- http://people.sc.fsu.edu/~burkardt/f_src/arpack/arpack.html -- can you use that? Also see http://people.sc.fsu.edu/~burkardt/f_src/lapack/lapack.html and http://people.sc.fsu.edu/~burkardt/f_src/blas1_s/blas1_s.html
Or Intel Visual Fortran should be able to compile Fortran 77 using suitable compiler options. What language constructs is it rejecting?