linux - 什么是 libg2c 库?

标签 linux gcc g++ libraries

我找到了链接到“g2c”库的代码。为什么我需要它?只是想了解为什么它可能很重要以及它通常有什么作用。

谢谢!

最佳答案

What is GNU Fortran?

g77 consists of several components:

  • A modified version of the gcc command, which also might be installed as the system's cc command. (In many cases, cc refers to the system's “native” C compiler, which might be a non-GNU compiler, or an older version of gcc considered more stable or that is used to build the operating system kernel.)

  • The g77 command itself, which also might be installed as the system's f77 command.

  • The libg2c run-time library. This library contains the machine code needed to support capabilities of the Fortran language that are not directly provided by the machine code generated by the g77 compilation phase.

    libg2c is just the unique name g77 gives to its version of libf2c to distinguish it from any copy of libf2c installed from f2c (or versions of g77 that built libf2c under that same name) on the system.

您可能会认为,libg2c 之于 g77 就像 libc 之于 gcc

请注意,从 GCC 4.x 系列开始,g77 已停用,取而代之的是 gfortran ,它生成的程序不需要额外的 libg2c 运行时库。

关于linux - 什么是 libg2c 库?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2406581/

相关文章:

c - SECCOMP:如何模拟 malloc、realloc 和 free?

clang:不能将 'precompiled-header' 输出与多个 -arch 选项一起使用

c++ - 如何强制 gcc 链接未使用的静态库

c - 构建 GCC 使 : *** [all] Error 2

linux - 如何将 Oracle 中的数据库模式导出到转储文件

linux - 无缘无故“无规则制定目标”

linux - 制作-j 8 g++ : internal compiler error: Killed (program cc1plus)

c++ - C++函数的声明和定义不同,但效果很好

linux - 从 shell 脚本调用 elinks 有时会双重触发

linux - 如何在新行上获取 diff 命令的输出