sorry to ask questions again but I’m trying to figure out what is the best way to create a static or shared library under Mac. First of all, I understand that only the 32-bit version provides this option by using flag “dynamiclib” / will it be available for 64-bit ? Is there a way to do it under 64 ?
Also, I’m experiencing some linkings errors like :
ld: absolute addressing (perhaps -mdynamic-no-pic) …
not allowed in slidable image. Use ‘-read_only_relocs suppress’ to enable text relocs
How can I get around that / I don’t see an option in OS X to disable “pic”
The command creating looks correct. In fact, I tried a simple example and it works fine on Snow Leopard with 32-bit. I use the same command you use for creating dynamic library. I assume you use 9.0-4?
Here is how I link: pgf95 main.f libtest.dylib
We may need more information as to why it fails for you. Can you provide us a small test case that fails for you and send it to trs@pgroup.com?
For 64-bit dynamic library, you can look at libtool for dynamic library.