Dynamic Linking Problems with Intel Compiler
I'm trying to create a python module which can be used by a python
interpreter embedded inside a fortran program I have. To do this, I
first created python wrappers for all the functions in my fortran
program using f2py. I then start an embedded python interpreter in c
code which I link against the fortran program. I invoke the fortran
program with a filename containing python code. This file is passed
to the c code which passes it on to the python interpreter which
executes it, causing the python module to be imported and allowing the
python code to control the fortran application.
At least, that is the idea.
The python module I am creating is called mirandaInternal.so. It
contains the python wrappers, but is not linked against object files
for the main fortan program. The idea is that those symbols should be
resolved at run-time.
The problem is that for some reason the symbols are not able to be
resolved. I am using gcc to do the c compiling and ifort (the intel
fortran compiler) to do the fortran compiling and all of the linking.
I have tried using the "-Bdynamic" flag when linking both the
executable and the shared library for the module, but that has not
seemed to help.
Has anyone have any suggestions as to what I need to do to the the
dynamic linking to work properly?
Thanks in advance,
Re: Dynamic Linking Problems with Intel Compiler
Jeff Hagelberg wrote:
> Has anyone have any suggestions as to what I need to do to the the
> dynamic linking to work properly?
You need to pass the -export-dynamic flag to the linker that links
in the embedded Python interpreter. When linking with gcc, this
is achieved through -Xlinker -export-dynamic; whether this works
for ifort as well, I don't know.
|All times are GMT. The time now is 03:05 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.