OS X Yosemite gcc 无法识别的命令行选项 'mdll' 在 brew install gcc 之后
OS X Yosemite gcc unrecognized command line option 'mdll' after brew install gcc
我使用 brew 安装了 gcc,因为我需要安装 brew 的 Fortran 包。 brew install gcc
安装的gcc包似乎不支持mdll
标志。如何安装正确版本的 Fortran 和 gcc?
$ which gcc
/usr/local/bin/gcc
$ gcc --version
gcc (GCC) 4.9.2 20141029 (prerelease)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc -mdll
gcc: error: unrecognized command line option ‘-mdll’
gcc: fatal error: no input files
compilation terminated.
根据 gcc(1)
联机帮助页:
-mdll
This option is available for Cygwin and MinGW targets. It
specifies that a DLL---a dynamic link library---is to be generated,
enabling the selection of the required runtime startup object and
entry point.
由于 OS X 既不是 Cygwin 也不是 MinGW,因此可以安全地假设任何版本的 GCC 都不会在 OS X 上启用它。
如果您正在尝试构建动态链接对象(UNIX 术语中的 "shared object"),请查看 -dynamic
/-dynamiclib
标志。它们似乎是 OS X 上的粗略等价物。
我使用 brew 安装了 gcc,因为我需要安装 brew 的 Fortran 包。 brew install gcc
安装的gcc包似乎不支持mdll
标志。如何安装正确版本的 Fortran 和 gcc?
$ which gcc
/usr/local/bin/gcc
$ gcc --version
gcc (GCC) 4.9.2 20141029 (prerelease)
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ gcc -mdll
gcc: error: unrecognized command line option ‘-mdll’
gcc: fatal error: no input files
compilation terminated.
根据 gcc(1)
联机帮助页:
-mdll
This option is available for Cygwin and MinGW targets. It
specifies that a DLL---a dynamic link library---is to be generated,
enabling the selection of the required runtime startup object and
entry point.
由于 OS X 既不是 Cygwin 也不是 MinGW,因此可以安全地假设任何版本的 GCC 都不会在 OS X 上启用它。
如果您正在尝试构建动态链接对象(UNIX 术语中的 "shared object"),请查看 -dynamic
/-dynamiclib
标志。它们似乎是 OS X 上的粗略等价物。