【问题标题】:Understanding LD options in make file了解 make 文件中的 LD 选项
【发布时间】:2012-12-05 10:49:12
【问题描述】:

我最近下载了 graclus 软件。在尝试安装它时,我必须使用一些选项来完成 makefile.in。我想出了其他选项,但我找不到我们为 LDOPTIONS 编写的内容。

谁能帮我弄清楚我应该在编译器使用的选项中填写什么? 我们将不胜感激。

//这里是makefile.in

# Which compiler to use
CC = g++

# What optimization level to use
OPTFLAGS = -O2 -fPIC

# What options to be used by the compiler
COPTIONS = -DNUMBITS=32

# What options to be used by the loader
LDOPTIONS =

# What archiving to use 
AR = ar rv

# What to use for indexing the archive
RANLIB = ranlib

ARCH = P4SSE2

LAPACK = -llapack_$(ARCH)

ARPACK = -lcarpack_$(ARCH)

ATLAS  = -latlas_$(ARCH)

CBLAS  = -lcblaswr -lcblas -lblas -lmyf2c

GSL = -lgslcblas -lgsl

SPARSE = -lsparse

UTIL = -lmyutil

【问题讨论】:

    标签: makefile ld


    【解决方案1】:

    由于您提供的 Makefile 只是一个摘录,并且您没有提到您正在使用哪个包或库来编译它,所以我只是在这里猜测一下。

    LDOPTIONS 可以提供与常用变量 LDFLAGS 类似的用途,它提供了一种为链接器指定额外标志的方法。这取决于您使用的链接器。如果您使用 gcc,则可以运行 ma​​n ld 来查看链接器选项列表。

    【讨论】:

    • 感谢它保持原样!
    • 谢谢伙计,虽然这个问题无关紧要!你的回答让我知道我可能做错了什么。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-10-20
    • 2012-02-14
    • 1970-01-01
    • 1970-01-01
    • 2010-12-06
    • 2010-11-17
    相关资源
    最近更新 更多