<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/147037</link>
    <title>MATLAB Central Newsreader - Problems linking MEX'ed object files.</title>
    <description>Feed for thread: Problems linking MEX'ed object files.</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Mon, 30 Apr 2007 05:36:27 -0400</pubDate>
      <title>Problems linking MEX'ed object files.</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/147037#369843</link>
      <author>Nicolai Brejnholt</author>
      <description>Hello&lt;br&gt;
First of all, should mention that I'm using MATLAB 6.5 release 13.&lt;br&gt;
I'm trying to MEX some C-code. For this purpose, I've written the&lt;br&gt;
proper interface. I found out early on, that the lcc C version 2.4&lt;br&gt;
included with MATLAB 6.5, was outdated for my purpose. Therefore I&lt;br&gt;
switched to MCSV6.0 (and also installed Watcom 10.6). If I use the -c&lt;br&gt;
(compile only) option, I can compile my code fine to .obj's. IF I try&lt;br&gt;
to link it however, I get this:&lt;br&gt;
&lt;br&gt;
Warning: Ignoring invalid option&lt;br&gt;
'LIBPATH:&quot;C:\MATLAB6p5\extern\lib\win32\microsoft\msvc60&quot;&lt;br&gt;
Warning: Cannot locate 'libmx.lib'; skipping -- fuzzy name matching&lt;br&gt;
may not work&lt;br&gt;
Warning: Cannot extract external symbols from 'libmx.lib' -- fuzzy&lt;br&gt;
linking may not work&lt;br&gt;
----same warning repeats for the 3 other files needed (libmex.lib,&lt;br&gt;
libmatlb.lib and libmat.lib)----&lt;br&gt;
Warning! EW1008: cannot open libmx.lib : No such file or directory&lt;br&gt;
----same warning repeats for the 3 other files needed----&lt;br&gt;
Error! E2028: mxGetNumberofElements_ is an undefined reference&lt;br&gt;
----same error repeats for the other mx-types I use----&lt;br&gt;
&lt;br&gt;
It doesn't take a genius to see what happens, but why? The needed&lt;br&gt;
files ARE located in the LIBPATH path, so why does it &quot;ignore invalid&lt;br&gt;
option&quot;?&lt;br&gt;
&lt;br&gt;
Also, if I try to use Watcom to link it, I get the same problem&lt;br&gt;
(albeit in less details. It just tells me, that the references are&lt;br&gt;
undefined).&lt;br&gt;
&lt;br&gt;
And while we are at it. It also fails to include a .lib file, that I&lt;br&gt;
added to my compilation. I've tried adding it after my .c-files&lt;br&gt;
simply as libname.lib and also tried adding it, when simply linking&lt;br&gt;
the objects. Doesn't use it.</description>
    </item>
    <item>
      <pubDate>Thu, 03 May 2007 10:09:23 -0400</pubDate>
      <title>Re: Problems linking MEX'ed object files.</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/147037#370547</link>
      <author>Nicolai Brejnholt</author>
      <description>Wonder if it's allowed to bump posts?&lt;br&gt;
&lt;br&gt;
Anyway, I added the .lib files to the list in my mexopts .bat file&lt;br&gt;
and put the .bat file in the library where I link my objects. It now&lt;br&gt;
finds .lib files, but it still doesn&#180;t recoignize the functions. I&lt;br&gt;
get:&lt;br&gt;
&lt;br&gt;
Error! E2028: mxGetNumberOfElements_ is an undefined reference&lt;br&gt;
Error! E2028: mxCalloc_ is an undefined reference&lt;br&gt;
Error! E2028: mxGetString_ is an undefined reference&lt;br&gt;
Error! E2028: mexWarnMsgTxt_ is an undefined reference&lt;br&gt;
Error! E2028: ffiopn_ is an undefined reference&lt;br&gt;
Error! E2028: ffgipr_ is an undefined reference&lt;br&gt;
Error! E2028: ffgics_ is an undefined reference&lt;br&gt;
Error! E2028: ffgpv_ is an undefined reference&lt;br&gt;
Error! E2028: ffclos_ is an undefined reference&lt;br&gt;
Error! E2028: ffwldp_ is an undefined reference&lt;br&gt;
Error! E2028: fftplt_ is an undefined reference&lt;br&gt;
Error! E2028: ffmnhd_ is an undefined reference&lt;br&gt;
Error! E2028: ffukyj_ is an undefined reference&lt;br&gt;
Error! E2028: ffukye_ is an undefined reference&lt;br&gt;
Error! E2028: LoadElt_ is an undefined reference&lt;br&gt;
Error! E2028: ffopentest_ is an undefined reference&lt;br&gt;
Error! E2028: ffgnrw_ is an undefined reference&lt;br&gt;
Error! E2028: ffukys_ is an undefined reference&lt;br&gt;
Error! E2028: ffrprt_ is an undefined reference&lt;br&gt;
Error! E2028: ffrsim_ is an undefined reference&lt;br&gt;
Error! E2028: ffppre_ is an undefined reference&lt;br&gt;
Error! E2028: ffgtvf_ is an undefined reference&lt;br&gt;
Error! E2028: ffghdn_ is an undefined reference&lt;br&gt;
Error! E2028: ffthdu_ is an undefined reference&lt;br&gt;
Error! E2028: ffgkys_ is an undefined reference&lt;br&gt;
Error! E2028: ffcmsg_ is an undefined reference&lt;br&gt;
Error! E2028: ffcopy_ is an undefined reference&lt;br&gt;
Error! E2028: ffmahd_ is an undefined reference&lt;br&gt;
Error! E2028: ffgkye_ is an undefined reference&lt;br&gt;
Error! E2028: ffgtam_ is an undefined reference&lt;br&gt;
Error! E2028: ffgtnm_ is an undefined reference&lt;br&gt;
Error! E2028: GetValInTable_ is an undefined reference&lt;br&gt;
Error! E2028: erf_ is an undefined reference&lt;br&gt;
Error! E2028: ffgerr_ is an undefined reference&lt;br&gt;
Error! E2028: ffgmsg_ is an undefined reference&lt;br&gt;
Error! E2028: ffpmsg_ is an undefined reference&lt;br&gt;
Error! E2028: setall_ is an undefined reference&lt;br&gt;
Error! E2028: ignlgi_ is an undefined reference&lt;br&gt;
Error! E2028: rint_ is an undefined reference&lt;br&gt;
Error! E2028: ffgcv_ is an undefined reference&lt;br&gt;
Error! E2028: ffpcn_ is an undefined reference&lt;br&gt;
Error! E2028: ffpdat_ is an undefined reference&lt;br&gt;
Error! E2028: ffgstm_ is an undefined reference&lt;br&gt;
Error! E2028: ffphis_ is an undefined reference&lt;br&gt;
Error! E2028: ffukls_ is an undefined reference&lt;br&gt;
Error! E2028: ffuky_ is an undefined reference&lt;br&gt;
Error! E2028: ffgcvd_ is an undefined reference&lt;br&gt;
Error! E2028: ffukyd_ is an undefined reference&lt;br&gt;
Error! E2028: ffpunt_ is an undefined reference&lt;br&gt;
Error! E2028: ffghsp_ is an undefined reference&lt;br&gt;
Error! E2028: ffgrec_ is an undefined reference&lt;br&gt;
Error! E2028: ffgnxk_ is an undefined reference&lt;br&gt;
Error! E2028: ffflus_ is an undefined reference&lt;br&gt;
Error! E2028: ffflnm_ is an undefined reference&lt;br&gt;
Error! E2028: ffgtcl_ is an undefined reference&lt;br&gt;
Error! E2028: ffgcnn_ is an undefined reference&lt;br&gt;
Error! E2028: ffgkyn_ is an undefined reference&lt;br&gt;
Error! E2028: ffgkyj_ is an undefined reference&lt;br&gt;
file grimex.obj(C:\MATLAB6p5\work\grimex\grimex.c): undefined symbol&lt;br&gt;
mxGetNumberOfElements_&lt;br&gt;
file grimex.obj(C:\MATLAB6p5\work\grimex\grimex.c): undefined symbol&lt;br&gt;
mxCalloc_&lt;br&gt;
file grimex.obj(C:\MATLAB6p5\work\grimex\grimex.c): undefined symbol&lt;br&gt;
mxGetString_&lt;br&gt;
file grimex.obj(C:\MATLAB6p5\work\grimex\grimex.c): undefined symbol&lt;br&gt;
mexWarnMsgTxt_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffiopn_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffgipr_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffgics_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffgpv_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffclos_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffwldp_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol fftplt_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffmnhd_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffukyj_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffukye_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol LoadElt_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffopentest_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffgnrw_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffukys_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffrprt_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffrsim_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffppre_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffgtvf_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffghdn_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffthdu_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffgkys_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffcmsg_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffcopy_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffmahd_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffgkye_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffgtam_&lt;br&gt;
file GRILib_DataIO.obj(C:\MATLAB6p5\work\grimex\GRILib_DataIO.c):&lt;br&gt;
undefined symbol ffgtnm_&lt;br&gt;
file GRILib_LensSimu.obj(C:\MATLAB6p5\work\grimex\GRILib_LensSimu.c):&lt;br&gt;
undefined symbol GetValInTable_&lt;br&gt;
file GRILib_LensSimu.obj(C:\MATLAB6p5\work\grimex\GRILib_LensSimu.c):&lt;br&gt;
undefined symbol erf_&lt;br&gt;
file GRILib_LensSimu.obj(C:\MATLAB6p5\work\grimex\GRILib_LensSimu.c):&lt;br&gt;
undefined symbol ffwldp_&lt;br&gt;
file GRI_BuildLens.obj(C:\MATLAB6p5\work\grimex\GRI_BuildLens.c):&lt;br&gt;
undefined symbol LoadElt_&lt;br&gt;
file GRI_BuildLens.obj(C:\MATLAB6p5\work\grimex\GRI_BuildLens.c):&lt;br&gt;
undefined symbol ffukye_&lt;br&gt;
file GRI_BuildLens.obj(C:\MATLAB6p5\work\grimex\GRI_BuildLens.c):&lt;br&gt;
undefined symbol ffclos_&lt;br&gt;
file GRILib_Errors.obj(C:\MATLAB6p5\work\grimex\GRILib_Errors.c):&lt;br&gt;
undefined symbol ffgerr_&lt;br&gt;
file GRILib_Errors.obj(C:\MATLAB6p5\work\grimex\GRILib_Errors.c):&lt;br&gt;
undefined symbol ffgmsg_&lt;br&gt;
file GRILib_Errors.obj(C:\MATLAB6p5\work\grimex\GRILib_Errors.c):&lt;br&gt;
undefined symbol ffpmsg_&lt;br&gt;
file GRILib_Errors.obj(C:\MATLAB6p5\work\grimex\GRILib_Errors.c):&lt;br&gt;
undefined symbol ffcmsg_&lt;br&gt;
file GRILib_Math.obj(C:\MATLAB6p5\work\grimex\GRILib_Math.c):&lt;br&gt;
undefined symbol setall_&lt;br&gt;
file GRILib_randlib.obj(C:\MATLAB6p5\work\grimex\GRILib_randlib.c):&lt;br&gt;
undefined symbol ignlgi_&lt;br&gt;
file GRILib_SpcTools.obj(C:\MATLAB6p5\work\grimex\GRILib_SpcTools.c):&lt;br&gt;
undefined symbol rint_&lt;br&gt;
file GRILib_SpcTools.obj(C:\MATLAB6p5\work\grimex\GRILib_SpcTools.c):&lt;br&gt;
undefined symbol LoadElt_&lt;br&gt;
file GRILib_SpcTools.obj(C:\MATLAB6p5\work\grimex\GRILib_SpcTools.c):&lt;br&gt;
undefined symbol GetValInTable_&lt;br&gt;
file GRILib_SpcTools.obj(C:\MATLAB6p5\work\grimex\GRILib_SpcTools.c):&lt;br&gt;
undefined symbol erf_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffgcv_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffpcn_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffukys_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffpdat_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffgstm_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffphis_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffukls_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffukye_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffgerr_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffcmsg_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffuky_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffghdn_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffthdu_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffmahd_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffcopy_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffgcvd_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffukyd_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffpunt_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffpmsg_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffghsp_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffgrec_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffgnxk_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffflus_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffflnm_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffgkys_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffgnrw_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffgtcl_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffgcnn_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffgkyn_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffgkyj_&lt;br&gt;
file&lt;br&gt;
GRILib_FitsTools.obj(C:\MATLAB6p5\work\grimex\GRILib_FitsTools.c):&lt;br&gt;
undefined symbol ffmnhd_&lt;br&gt;
&lt;br&gt;
Which is basicly ALL the functions defined in the .lib files as well&lt;br&gt;
as a few defined in code and included (without giving warnings during&lt;br&gt;
compilation)</description>
    </item>
    <item>
      <pubDate>Thu, 03 May 2007 11:19:38 -0400</pubDate>
      <title>Re: Problems linking MEX'ed object files.</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/147037#370558</link>
      <author>Tom Clark</author>
      <description>Hi,&lt;br&gt;
&lt;br&gt;
I have had a problem similar to yours; although using Intel Fortran&lt;br&gt;
compiler. I couldn't get it to recognise linked objects.&lt;br&gt;
&lt;br&gt;
I found it to be sensitive to the order in which files were specified&lt;br&gt;
in the mex command:&lt;br&gt;
&lt;br&gt;
i used (e.g)&lt;br&gt;
mex -g pvl.f forces.f dmods.f&lt;br&gt;
&lt;br&gt;
which wouldn't link the modules contained in dmods.f which are used&lt;br&gt;
in pvl.f&lt;br&gt;
&lt;br&gt;
In the end, I used&lt;br&gt;
mex -g dmods.f pvl.f forces.f&lt;br&gt;
to create intermediate objects with the mex compiler, then the&lt;br&gt;
original command:&lt;br&gt;
mex -g pvl.f forces.f dmods.f&lt;br&gt;
and this worked fine.&lt;br&gt;
&lt;br&gt;
I'm not a specialist; so am sorry if this is incorrect- but it might&lt;br&gt;
be worthwhile trying!&lt;br&gt;
&lt;br&gt;
good luck!</description>
    </item>
    <item>
      <pubDate>Fri, 04 May 2007 12:13:25 -0400</pubDate>
      <title>Re: Problems linking MEX'ed object files.</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/147037#370754</link>
      <author>Nicolai Brejnholt</author>
      <description>Tom Clark wrote:&lt;br&gt;
&amp;gt; I found it to be sensitive to the order in which files were&lt;br&gt;
&amp;gt; specified&lt;br&gt;
&amp;gt; in the mex command:&lt;br&gt;
&lt;br&gt;
Hi&lt;br&gt;
&lt;br&gt;
I tried rearranging the files in a way that made sense (given from&lt;br&gt;
what functions it seemed to be missing and where these were located),&lt;br&gt;
but it made no difference. Then I just tried arranging them randomly&lt;br&gt;
and again, it made no impact (except on the order in which they are&lt;br&gt;
displayed in the error log:p ).&lt;br&gt;
Could be that there is a magical way of arranging them, but if it is&lt;br&gt;
truely so random, I guess I am out of look, seeing as I have more&lt;br&gt;
than 10 files. (Which means I can arrange them in 10! different ways,&lt;br&gt;
I guess.)</description>
    </item>
    <item>
      <pubDate>Fri, 04 May 2007 16:44:00 -0400</pubDate>
      <title>Re: Problems linking MEX'ed object files.</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/147037#370820</link>
      <author>Nicolai Brejnholt</author>
      <description>Well, turns out it is MATLAB 6.5 release 13, which is unable to use&lt;br&gt;
newer compiler/linkers appearently. To explain:&lt;br&gt;
&lt;br&gt;
[1] Borland C/C++ version 5.0 in C:\BC5&lt;br&gt;
[2] Digital Visual Fortran version 6.0 in C:\Program Files\Microsoft&lt;br&gt;
Visual Studio&lt;br&gt;
[3] Lcc C version 2.4 in C:\MATLAB6P5\sys\lcc&lt;br&gt;
[4] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft&lt;br&gt;
Visual Studio&lt;br&gt;
[5] WATCOM C/C++ version 10.6 in C:\WATCOM&lt;br&gt;
&lt;br&gt;
If I use the default (lcc) or the Borland (which is from, what,&lt;br&gt;
1995ish?) I can mex yprime.c (example included with MATLAB). If I use&lt;br&gt;
MSVC or WATCOM (both of which are only a few years old) I get the&lt;br&gt;
exact same errors trying to mex yprime.c, as I do when trying to mex&lt;br&gt;
my own large collection of code.&lt;br&gt;
&lt;br&gt;
MSVC:&lt;br&gt;
Warning: Ignoring invalid option&lt;br&gt;
'LIBPATH:&quot;C:\MATLAB6p5\extern\lib\win32\microsoft\msvc60&quot;'&lt;br&gt;
Warning: Cannot locate 'libmx.lib'; skipping -- fuzzy name matching&lt;br&gt;
may not work&lt;br&gt;
Warning: Cannot extract external symbols from 'libmx.lib' -- fuzzy&lt;br&gt;
linking may not work&lt;br&gt;
Warning: Cannot locate 'libmex.lib'; skipping -- fuzzy name matching&lt;br&gt;
may not work&lt;br&gt;
Warning: Cannot extract external symbols from 'libmex.lib' -- fuzzy&lt;br&gt;
linking may not work&lt;br&gt;
Warning: Cannot locate 'libmatlb.lib'; skipping -- fuzzy name&lt;br&gt;
matching may not work&lt;br&gt;
Warning: Cannot extract external symbols from 'libmatlb.lib' -- fuzzy&lt;br&gt;
linking may not work&lt;br&gt;
Warning: Cannot locate 'libmat.lib'; skipping -- fuzzy name matching&lt;br&gt;
may not work&lt;br&gt;
Warning: Cannot extract external symbols from 'libmat.lib' -- fuzzy&lt;br&gt;
linking may not work&lt;br&gt;
Warning: Cannot locate 'cfitsio.lib'; skipping -- fuzzy name matching&lt;br&gt;
may not work&lt;br&gt;
Warning: Cannot extract external symbols from 'cfitsio.lib' -- fuzzy&lt;br&gt;
linking may not work&lt;br&gt;
Warning! W1008: cannot open libmx.lib : No such file or directory&lt;br&gt;
Warning! W1008: cannot open libmex.lib : No such file or directory&lt;br&gt;
Warning! W1008: cannot open libmatlb.lib : No such file or directory&lt;br&gt;
Warning! W1008: cannot open libmat.lib : No such file or directory&lt;br&gt;
Warning! W1008: cannot open cfitsio.lib : No such file or directory&lt;br&gt;
Error! E2028: mexWarnMsgTxt_ is an undefined reference&lt;br&gt;
Error! E2028: mexErrMsgTxt_ is an undefined reference&lt;br&gt;
Error! E2028: mxGetM_ is an undefined reference&lt;br&gt;
Error! E2028: mxGetN_ is an undefined reference&lt;br&gt;
Error! E2028: mxIsDouble_ is an undefined reference&lt;br&gt;
Error! E2028: mxIsComplex_ is an undefined reference&lt;br&gt;
Error! E2028: mxCreateDoubleMatrix_ is an undefined reference&lt;br&gt;
Error! E2028: mxGetPr_ is an undefined reference&lt;br&gt;
file yprime.obj(C:\MATLAB6p5\extern\examples\mex\yprime.c): undefined&lt;br&gt;
symbol mexWarnMsgTxt_&lt;br&gt;
file yprime.obj(C:\MATLAB6p5\extern\examples\mex\yprime.c): undefined&lt;br&gt;
symbol mexErrMsgTxt_&lt;br&gt;
file yprime.obj(C:\MATLAB6p5\extern\examples\mex\yprime.c): undefined&lt;br&gt;
symbol mxGetM_&lt;br&gt;
file yprime.obj(C:\MATLAB6p5\extern\examples\mex\yprime.c): undefined&lt;br&gt;
symbol mxGetN_&lt;br&gt;
file yprime.obj(C:\MATLAB6p5\extern\examples\mex\yprime.c): undefined&lt;br&gt;
symbol mxIsDouble_&lt;br&gt;
file yprime.obj(C:\MATLAB6p5\extern\examples\mex\yprime.c): undefined&lt;br&gt;
symbol mxIsComplex_&lt;br&gt;
file yprime.obj(C:\MATLAB6p5\extern\examples\mex\yprime.c): undefined&lt;br&gt;
symbol mxCreateDoubleMatrix_&lt;br&gt;
file yprime.obj(C:\MATLAB6p5\extern\examples\mex\yprime.c): undefined&lt;br&gt;
symbol mxGetPr_&lt;br&gt;
&lt;br&gt;
WATCOM:&lt;br&gt;
&lt;br&gt;
Error! E1073: Invalid option '-7'&lt;br&gt;
Error: Compiler returned a bad status compiling &quot;yprime.c&quot;&lt;br&gt;
&amp;nbsp;&lt;br&gt;
&amp;nbsp;&amp;nbsp;C:\MATLAB6P5\BIN\WIN32\MEX.PL: Error: Compile of 'yprime.c' failed.</description>
    </item>
    <item>
      <pubDate>Fri, 04 May 2007 16:46:37 -0400</pubDate>
      <title>Re: Problems linking MEX'ed object files.</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/147037#370821</link>
      <author>Nicolai Brejnholt</author>
      <description>(Ah, btw, worth to mention, that I need the newer compilers/linkers&lt;br&gt;
to use the code at all. Several newer types etc. used in it. So any&lt;br&gt;
help would still be highly sought after.)</description>
    </item>
    <item>
      <pubDate>Wed, 20 Jun 2007 09:30:46 -0400</pubDate>
      <title>Re: Problems linking MEX'ed object files.</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/147037#378724</link>
      <author>Martin Ozimek</author>
      <description>Are you sure that something like Borland c++ can't get it done? I&lt;br&gt;
had this same problem as you. I have Visual Studio.net 2005 and it&lt;br&gt;
is not compatabile with current versions of Matlab as far as I know.&lt;br&gt;
I ended up finding a free version of the Borland c++ compiler. (I&lt;br&gt;
googled free borland c++ builder). Now obviously we may be compiling&lt;br&gt;
different codes, but if nothing else is working it may be worth a&lt;br&gt;
shot. All of my files are now compiling, since previously, I only&lt;br&gt;
had the internal lcc compiler which will not even compile a *.cpp&lt;br&gt;
file. Well you said *any* help would be sought after, so I'm not&lt;br&gt;
sure this was much, but it's an attempt.&lt;br&gt;
&lt;br&gt;
Good luck,&lt;br&gt;
&lt;br&gt;
Marty&lt;br&gt;
&lt;br&gt;
Nicolai Brejnholt wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; (Ah, btw, worth to mention, that I need the newer compilers/linkers&lt;br&gt;
&amp;gt; to use the code at all. Several newer types etc. used in it. So any&lt;br&gt;
&amp;gt; help would still be highly sought after.)</description>
    </item>
    <item>
      <pubDate>Wed, 20 Jun 2007 12:07:46 -0400</pubDate>
      <title>Re: Problems linking MEX'ed object files.</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/147037#378754</link>
      <author>Eric Sampson</author>
      <description>Martin Ozimek wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Are you sure that something like Borland c++ can't get it done? I&lt;br&gt;
&amp;gt; had this same problem as you. I have Visual Studio.net 2005 and it&lt;br&gt;
&amp;gt; is not compatabile with current versions of Matlab as far as I&lt;br&gt;
&amp;gt; know.&lt;br&gt;
&amp;gt; I ended up finding a free version of the Borland c++ compiler. (I&lt;br&gt;
&amp;gt; googled free borland c++ builder). Now obviously we may be&lt;br&gt;
&amp;gt; compiling&lt;br&gt;
&amp;gt; different codes, but if nothing else is working it may be worth a&lt;br&gt;
&amp;gt; shot. All of my files are now compiling, since previously, I only&lt;br&gt;
&amp;gt; had the internal lcc compiler which will not even compile a *.cpp&lt;br&gt;
&amp;gt; file. Well you said *any* help would be sought after, so I'm not&lt;br&gt;
&amp;gt; sure this was much, but it's an attempt.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Good luck,&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Marty&lt;br&gt;
&amp;gt;&lt;br&gt;
&lt;br&gt;
Martin, Microsoft Visual C++ 2005 has been supported since MATLAB 7.2&lt;br&gt;
(R2006a), which was released in March of 2006.&lt;br&gt;
&lt;br&gt;
Sincerely,&lt;br&gt;
Eric Sampson&lt;br&gt;
The MathWorks, Inc.</description>
    </item>
    <item>
      <pubDate>Wed, 20 Jun 2007 12:17:11 -0400</pubDate>
      <title>Re: Problems linking MEX'ed object files.</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/147037#378756</link>
      <author>Martin Ozimek</author>
      <description>Eric Sampson wrote:&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Martin Ozimek wrote:&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Are you sure that something like Borland c++ can't get it done?&lt;br&gt;
&amp;gt; I&lt;br&gt;
&amp;gt;&amp;gt; had this same problem as you. I have Visual Studio.net 2005&lt;br&gt;
and&lt;br&gt;
&amp;gt; it&lt;br&gt;
&amp;gt;&amp;gt; is not compatabile with current versions of Matlab as far as I&lt;br&gt;
&amp;gt;&amp;gt; know.&lt;br&gt;
&amp;gt;&amp;gt; I ended up finding a free version of the Borland c++ compiler.&lt;br&gt;
&amp;gt; (I&lt;br&gt;
&amp;gt;&amp;gt; googled free borland c++ builder). Now obviously we may be&lt;br&gt;
&amp;gt;&amp;gt; compiling&lt;br&gt;
&amp;gt;&amp;gt; different codes, but if nothing else is working it may be worth&lt;br&gt;
a&lt;br&gt;
&amp;gt;&amp;gt; shot. All of my files are now compiling, since previously, I&lt;br&gt;
&amp;gt; only&lt;br&gt;
&amp;gt;&amp;gt; had the internal lcc compiler which will not even compile a&lt;br&gt;
*.cpp&lt;br&gt;
&amp;gt;&amp;gt; file. Well you said *any* help would be sought after, so I'm&lt;br&gt;
not&lt;br&gt;
&amp;gt;&amp;gt; sure this was much, but it's an attempt.&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Good luck,&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&amp;gt; Marty&lt;br&gt;
&amp;gt;&amp;gt;&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Martin, Microsoft Visual C++ 2005 has been supported since MATLAB&lt;br&gt;
&amp;gt; 7.2&lt;br&gt;
&amp;gt; (R2006a), which was released in March of 2006.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; Sincerely,&lt;br&gt;
&amp;gt; Eric Sampson&lt;br&gt;
&amp;gt; The MathWorks, Inc.&lt;br&gt;
&amp;nbsp;&amp;nbsp;&lt;br&gt;
Well let me be more clear, my Matlab version is 7.0, and I'm unable&lt;br&gt;
to run Visual Studio.net 2005 through the mex interface, so I was&lt;br&gt;
just going with my own personal experience and not making a company&lt;br&gt;
claim here.</description>
    </item>
  </channel>
</rss>

