MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Mathlink on Windows and Cygwin

  • To: mathgroup at smc.vnet.net
  • Subject: [mg13034] Re: [mg12978] Mathlink on Windows and Cygwin
  • From: John Fultz <jfultz>
  • Date: Tue, 30 Jun 1998 00:26:31 -0400
  • Organization: Wolfram Research, Inc.
  • References: <199806280652.CAA24346@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

I once attempted to create a library for the cygwin stuff (beta 18, I
believe...I see they're up to 19, now).  I was able to successfully
create an ml32i1.a library for linking purposes; however, I had a
number of other problems linking related to the standard Win32 API
(which left me with a very sour impression of the GNU-Win32 project's
level of non-console API support).  After fixing those, I discovered
that the resulting application crashed before executing the first
instruction in main().

Further testing indicated that *any* application with ml32i1.a linked in
crashed before executing the first instruction in main() (even if it
didn't use any MathLink functions).  Simply removing ml32i1.a from the
link order caused things to work.

I gave up, coming to the conclusion that either their library creation
system was too poorly documented for a professional Windows programmer
to understand it, or that there was a bug in their runtime libraries
that were binding ml32i1.dll at runtime.

I'm no longer interested in pursuing this until I see some significant
progress in the tools, but if you email me privately, I'll be happy to
provide you with the scripts (hackish though they are) I used to create
the .a and .exe files.  I would be interested to know if anyone has any
success here.

One additional step I did not try; instead of trying to create a .a
file, you could use LoadLibrary() and GetProcAddress() to bind the
MathLink functions at runtime. If creating a .a file continues to fail
(whether though poor documentation or bugs), runtime binding will
probably have a much better chance of success.

A further suggestion would be to post your question to the gnu-win32
mailing list (if you haven't already).  This question requires less in
the way of MathLink expertise, then it does expertise with the
GNU-Win32 tools.

John Fultz
jfultz at wolfram.com
Front End Group
Wolfram Research, Inc.

tanguy Risset wrote:
> 
> Hello
> 
> I am trying to compile an application designed on Unix in C and
> Mathematica on a WindowsNT system.
> 
> I use Cygwin (gnu-win32 project, http://www.cygnus.com/misc/gnu-win32/)
> to compile my makefile on WindowsNT.
> 
> I have a problem in the linking with of the mathlink libraries
> (ml32i1*.lib)
> which are apparently does not recognized by the gcc compiler provided by
> Cygwin
> 
> If anyone had solved a similar problem, (linking mathlink program with
> cygwin),
> I'am interested in any advice
> 
> Thank you
> 
> Tanguy Risset
> 
> --
> | Tanguy Risset                 Tel (from France): 02-99-84-74-60 |
> Irisa                         Tel (not from France): +33 2-99-84-74-60
> 
> | Campus de Beaulieu            Fax: +33-(0)2-99-84-71-71 | 35042 Rennes
> E-Mail: risset at irisa.fr | FRANCE
> http://www.irisa.fr/api/HOMEPAGE/Risset/


  • Prev by Date: Better WorldPlot data?
  • Next by Date: Re: Mathematica books
  • Previous by thread: Mathlink on Windows and Cygwin
  • Next by thread: Mathematica books