Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

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

Search the Archive

Re: Re: MathLink and c++ compiler

  • To: mathgroup at smc.vnet.net
  • Subject: [mg113678] Re: Re: MathLink and c++ compiler
  • From: "Chris Degnen" <degnen at cwgsy.net>
  • Date: Sun, 7 Nov 2010 05:12:08 -0500 (EST)
  • References: <29013548.935591289028682610.JavaMail.defaultUser@defaultHost>

Paolo emailed:
>
> Hello,
> now the fatal error with ml32i3.dll is "invalid file cannot read at 0x2A8"
>
> rgrds,
> Paolo


Hi, Sorry I can't help you further.

I found an unresolved symbol problem using ml32i1m.lib, which went away when 
I used ml32i3m.lib instead.
To illustrate, here is the command sequence from the MathLink documentation 
which I used at the Visual Studio command prompt:-



Setting environment for using Microsoft Visual Studio 2008 x86 tools.

C:\Program Files\Microsoft Visual Studio 9.0\VC>prompt $g

>cd \docume~1\chris\mydocu~1\factor

>SET CL=/nologo /c /DWIN32 /D_CONSOLE /W3 /O2 /DNDEBUG

>SET LINK=/NOLOGO /SUBSYSTEM:console /INCREMENTAL:no /PDB:NONE kernel32.lib 
>user
32.lib

>CL factor.c
factor.c

>LINK factor.obj ml32i1m.lib /OUT:factor.exe
factor.obj : error LNK2019: unresolved external symbol _MLOpenArgcArgv@16 
refere
nced in function _init_and_openlink
factor.exe : fatal error LNK1120: 1 unresolved externals

>LINK factor.obj ml32i3m.lib /OUT:factor.exe

>factor -linklaunch
Integer to factor: 1234
2 ^ 1
617 ^ 1

>



----- Original Message ----- 
From: <tarpane... at libero.it>
To: <degn... at cwgsy.net>
Sent: Saturday, November 06, 2010 7:31 AM
Subject: [mg113678] R: Re: MathLink and c++ compiler


Hello,
now the fatal error with ml32i3.dll is "invalid file cannot read at 0x2A8"

rgrds,
Paolo

>----Messaggio originale----
>Da: degn... at cwgsy.net
>Data: 04/11/2010 20.08
>A: "tarpane... at libero.it"<tarpane... at libero.it>
>Ogg: Re: MathLink and c++ compiler
>
>On Nov 4, 9:06 am, "tarpane... at libero.it" <tarpane... at libero.it>
>wrote:
>> Hello,
>> I am trying to link mathematica to an external c++ function.
>> I can compile correctly but when I go to build the project it returns an
>> unresolved link problems because it can not open ml32i1.dll
>>
>> anyone has experienced similar problem? and if yes how does it has been
>> solved?
>> Thanks in advance
>> Paolo
>
>Try ml32i3.dll
>







  • Prev by Date: Re: Mysterious Apply troubles (a bug?)
  • Next by Date: Re: MathOO: Adding Object Orientation to Mathematica
  • Previous by thread: Re: MathLink and c++ compiler
  • Next by thread: Numerical solution of the heat equation on a disk with Dirichlet