Issue with GMP static linkage (and bundle)
haberg-1 at telia.com
Sat Sep 30 19:30:09 UTC 2017
> On 30 Sep 2017, at 14:51, Torbjörn Granlund <tg at gmplib.org> wrote:
> Daniele Ghisi <danieleghisi at gmail.com> writes:
> I need to link GMP statically to a project (written in C).
> Which version of GMP?
> I can't seem to do it if the Mach-O Type of my target is set to "Bundle".
> WHat does "type of target" mean in this context?
> No issues when it is set to "executable" or "static library".
> Weird things those apples. Why don't you avoid "Bundle" if that doesn't
A bundle is MacOS lingo for a standardized package directory, for example, and app .
> No issues when I use dynamic linkage either (with -lgmp)
> Perhaps something to consider, then?
So if doing an app, one possibility is static linkage, but one can also use dynamic linkge and include the library. For example, the LilyPond does that, specifically contains both the dynamic .dylib and static .la.
> I am on OS X 10.10.5,
This is from 2014, the current is MacOS 10.13.
> Xcode 7.2
The MacOS standard IDE. Current is Xcode 9.
> I have tried to install GMP manually or with homebrew, in both cases I
> still get the issue.
It is one of several MacOS package managers. It installs stuff in /use/local/ but more or less requires one changing permissions of this director to single user.
More information about the gmp-discuss