MathGroup Archive 1999

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

Search the Archive

Re: Help

  • To: mathgroup at
  • Subject: [mg18395] Re: Help
  • From: paulh at (P.J. Hinton)
  • Date: Wed, 7 Jul 1999 00:10:59 -0400
  • Organization: Wolfram Research, Inc.
  • References: <7lcf6u$>
  • Sender: owner-wri-mathgroup at

In article <7lcf6u$1kb at>, kwong at (Kwok Man Wong) writes:

> I can complie the addtwo on Visual C++. However, when I try to link
> it, a error message comes up as follows:
> --------------------Configuration: addtwo - Win32
> Debug--------------------
> Linking...
> addtwo.obj : error LNK2001: unresolved external symbol _MLMain
> Debug/addtwo.exe : fatal error LNK1120: 1 unresolved externals
> Error executing link.exe.
> addtwo.exe - 2 error(s), 0 warning(s)
> Could anyone tell me how to set up the link in VC++? The Wolfram does
> not provide the "libML.a" in window so I cannot use it. Could anybody
> please help? Thanks!

The reason that there is no libML.a file under Windows MathLink is that
Microsoft's C compiler supports a completely different model for handling
linkage to external libraries.  Instead, the compiler uses an import 
library (.lib file) to resolve external dependencies.  The actual code
for the MathLink libraries sits in a dynamic link library (.dll file).

You haven't given us any clue as to what build parameters you have chosen
to compile your project, so it is hard to say what might be the problem.
You may want to review the build instructions that are specific to 
Microsoft Visual C++ in the DeveloperGuide.nb notebook that resides in


to ensure that you are invoking the appropriate linker flags.

P.J. Hinton	
Mathematica Programming Group		paulh at
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.

  • Prev by Date: Contour Integrals
  • Next by Date: Need a means to get arguments of a function
  • Previous by thread: Contour Integrals
  • Next by thread: Re: Help