Question: Using shared librry on Mac OS X

I'm using a Mac Pro with Leopard, Maple12, and try to

use "define_external" to use a shared library I created (just a simple trial for now) but get the error:

> define_external('try_it', 'FORTRAN' , 'x'::float[8] , 'y'::float[8] , LIB="try/try_it.so");
Error, external linking: error loading external library try/try_it_ifort.so: dlopen(try/try_it.so, 129): no suitable image found.  Did find:
    try/try_it.so: mach-o, but wrong architecture
 

I compiled the library with:

% ifort -dynamiclib  try_it.f -o try_it.so

and also using "g95" and "gfortran" in stead of the "ifort" (they all produce a try_it.so with the same size

so I guess all three compilers just invoke libtool) and get the same error.

 

Please Wait...