delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/02/09/17:28:54

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <3.0.6.32.20000209143458.009213b0@aa.washington.edu>
X-Sender: capozzi AT aa DOT washington DOT edu
X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32)
Date: Wed, 09 Feb 2000 14:34:58 -0800
To: cygwin AT sourceware DOT cygnus DOT com
From: Brian Capozzi <capozzi AT aa DOT washington DOT edu>
Subject: problems creating fortran mex functions with cygwin-b20
Mime-Version: 1.0

To all,

i've recently downloaded the Cygwin B.20 and the following from Khan
Munit's ftp site:

gcc-2.95.2-cygb20.tar.gz
gcc-2.95.2-dev-ss.tar.gz
gcc-2.95.2-mingw-extra.tar.gz

and have installed the cygwin tools, and extracted the contents of the
aforementioned gcc-* files.  I have done some baseline testing - simple
compiles, built some libraries, etc. and it seems as though everything is
happy.  Have mounted root (/), /usr/local, /tmp, /bin.

Following the instructions for creating mex functions using the Cygwin
tools from http://www.mrc-cbu.cam.ac.uk/Imaging/gnumex20.html, i am now
able to succesfully build the C version of yprime.dll using:

mex -f mexopts.bat yprime.c

note:  in looking into the linkmex.sh file, i see that a "fixup" file
(fixup.c) is created which supposedly properly terminates the import list.
i tried building without this fix and it seemed to work just fine.

In trying to build the fortran version, i execute the following:

	mex -f mexopts.bat yprimef.f yprimefg.f

which, unfortunately leads to the following errors:

yprimefg.obj(.text+0xea):d:\matlabr11\e: undefined reference to
`mexerrmsgtxt_'
yprimefg.obj(.text+0xf9):d:\matlabr11\e: undefined reference to `mxgetm_'
yprimefg.obj(.text+0x105):d:\matlabr11\e: undefined reference to `mxgetn_'
yprimefg.obj(.text+0x138):d:\matlabr11\e: undefined reference to
`mexerrmsgtxt_'
yprimefg.obj(.text+0x150):d:\matlabr11\e: undefined reference to
`mxcreatefull_'
yprimefg.obj(.text+0x15b):d:\matlabr11\e: undefined reference to `mxgetpr_'
yprimefg.obj(.text+0x16a):d:\matlabr11\e: undefined reference to `mxgetpr_'
yprimefg.obj(.text+0x176):d:\matlabr11\e: undefined reference to `mxgetpr_'
yprimefg.obj(.text+0x191):d:\matlabr11\e: undefined reference to
`mxcopyptrtoreal8_'
yprimefg.obj(.text+0x1a6):d:\matlabr11\e: undefined reference to
`mxcopyptrtoreal8_'
yprimefg.obj(.text+0x1c9):d:\matlabr11\e: undefined reference to
`mxcopyreal8toptr_'
collect2: ld returned 1 exit status
dllwrap: g77 exited with status 1
Deleting temporary base file C:\TEMP\cc001273.base
 
  D:\MATLABR11\BIN\MEX.BAT: Link of 'yprimef.dll' failed. 

ironically, all the files which should be available through the import
library created based on MATLAB.DEF during the build process.  So what is
the problem with the import??

Another issue is that in referring to the MATLAB Mex-function manual
(RTFM!!), i noticed that in creating the .def file for export of the MEX
entry point, it is necessary to use EXPORTS MEXFUNCTION AT 16 for FORTRAN
rather than EXPORTS mexFunction which is the C convention.  Making this
change to the linkmex.sh script, however, did little to rectify the
situation, producing identical errors to those listed above.

So the question is, what am i missing?  Any help would be greatly
appreciated.  

Thanks!!
BC


                          ****
        --------------^^^--00--^^^---------------
                      | |  <   | |
                       \ \    / /

           e-mail:  capozzi AT aa DOT washington DOT edu
           office:  Aerosonde Development Lab
                    101 Kirsten Wind Tunnel 
           phone:   (206) 616-0579
           fax:     (206) 543-0217

                       ^^      ^^
        --------------ooo      ooo----------------


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019