如何向LDFLAGS添加路径 [英] How to add a path to LDFLAGS

查看:804
本文介绍了如何向LDFLAGS添加路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试建立一个名为 PBC (基于对的加密)的库.而且该库需要另一个名为 GMP -(GNU多重精度库)的库.

I'm trying to set up a library called PBC (Pairing-based cryptography). And this library requires another library called GMP -(GNU Multiple-Precision Library).

我的问题是正确安装GMP后,PBC出现以下错误:

My problem is after installing GMP correctly, PBC gives an error of:

找不到gmp库,将其路径添加到LDFLAGS

gmp library not found add its path to LDFLAGS

我不知道LDFLAGS是什么以及如何将其添加到路径中.

I have no idea what LDFLAGS is and how to add it to the path.

PS:我正在使用MinGW.

PS: I'm using MinGW.

推荐答案

这个问题的描述性不足以使任何人都能很好地回答,但是....

The question is not really descriptive enough for anyone to answer well, but....

在基于Unix的系统上,您可能会执行以下操作:

On a Unix-based system you would likely do something like this:

$ export LDFLAGS="-R/the/path/to/the/gmp/lib -L/the/path/to/the/gmp/lib"
$ ./configure
$ make
$ make install

带有GNU make工具的Windows环境将需要进行一些微调.

Windows environments with GNU make tools, will need minor tweaks.

这篇关于如何向LDFLAGS添加路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆