By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,995 Members | 1,266 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,995 IT Pros & Developers. It's quick & easy.

Dynamic Linking Problems with Intel Compiler

P: n/a
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 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,

Jeff Hagelberg
Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
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.

Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.