Install gmp with c++ with Dynamic Libraries.

March 23rd, 2006

I have to admit I’m a libtool noob. However I know gcc and g++ 4.0.1 available with MacOS Tiger are able to compile c++ dynamic libraries. In fact this is done with flag -dynamiclib

However, gmp if configured with –enable-cxx and without disabling dyamic libraries fails. In fact it passes g++ the -shared option (that works for linux). If you compile plain gmp with no C++ support, the problem does not exist. I’m afraid it’s a bug with gmp libtool (I suppose you could fix it with autoreconf, but I did not try it).

Unfortunately I need c++ support since I have to work with ppl. The solution is to modify all occurrences of “-shared” in the configure file with “-dynamiclib“. And appears not to work.

The same hack worked with readline (but I’m afraid that’s because readline was written in C and somehow support for C dynamic libraries seems better on mac os x: I’d say “older”, so it’s more likely developers made it work.

However darwin ports is able to build it the correct way. You only have to specify somewhere that gmp-cxx-wrappers should build with –host=none-apple-darwin

C and C++, Mac, Mac Programming, Mac Software, Open Source and Free Software | Comments | Trackback

Leave a Reply

  1.  
  2.  
  3.  
  4. XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>
You can keep track of new comments to this post with the comments feed.

Recent Posts

Blogroll

Siti amici

Misc

Recent Comments

Categories

Enrico Franchi graduated in Maths and Computer Science and is now studying for a Computet Science MSc (though because of italian bureaucracy that very course is to be cancelled).

RiK0's Tech Temple is using WP-Gravatar