From: "Tom Clark" <thclark@qinetiq.com>
Path: news.mathworks.com!newsfeed-00.mathworks.com!webcrossing
Newsgroups: comp.soft-sys.matlab
Subject: Re: Problems linking MEX'ed object files.
Message-ID: <ef55661.1@webcrossing.raydaftYaTP>
Date: Thu, 3 May 2007 11:19:38 -0400
References: <ef55661.-1@webcrossing.raydaftYaTP> <ef55661.0@webcrossing.raydaftYaTP>
Lines: 25
NNTP-Posting-Host: 192.102.214.6
MIME-Version: 1.0
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
Xref: news.mathworks.com comp.soft-sys.matlab:406721



Hi,

I have had a problem similar to yours; although using Intel Fortran
compiler. I couldn't get it to recognise linked objects.

I found it to be sensitive to the order in which files were specified
in the mex command:

i used (e.g)
mex -g pvl.f forces.f dmods.f

which wouldn't link the modules contained in dmods.f which are used
in pvl.f

In the end, I used
mex -g dmods.f pvl.f forces.f
to create intermediate objects with the mex compiler, then the
original command:
mex -g pvl.f forces.f dmods.f
and this worked fine.

I'm not a specialist; so am sorry if this is incorrect- but it might
be worthwhile trying!

good luck!