How to add a path to LDFLAGS

China☆狼群 提交于 2019-11-30 03:52:50

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

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

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

Foon
  1. Just to make sure we can't make this easier: are you trying to compile something extra such that you can't (or don't want to; I have no problems if you prefer to compile everything from source or what not but want to make sure you just didn't see it) use the precompiled binaries someone already built using MinGW? (Located here as of when I wrote this.)

  2. LDFLAGS are a convention with a C compiler for flags that should be passed to the loader part. In your case, you're most likely going to want to add something like -L/usr/local/lib (or wheverer GMP got put... I would expect you can probably figure it out by searching for libgmp.a ... if necessary, in your msys shell, cd to / and run find -name "libgmp.a"). If you open the Makefile in a text editor, you should find a LDFLAGS line, possibly empty (on my Linux box, it's just LDFLAGS= for that line).

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!