MathGroup Archive 2005

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

Search the Archive

Getting mathlink started

  • To: mathgroup at smc.vnet.net
  • Subject: [mg55868] Getting mathlink started
  • From: "Ryan Tibshirani" <ryantibs at stanford.edu>
  • Date: Fri, 8 Apr 2005 01:36:50 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

Hi everyone, I have a question about simply getting Mathlink started.  I 
have installed all of the compiler additions, etc. according to the 
documentation and I am trying to run the following code in C++, using 
Microsoft Visual Studio .NET 2003:

#include mathlink.h

int main(int argc, char *argv[])
{
 MLENV env;
 MLINK link;
 long errno;

 env = MLInitialize(0);
 link = MLOpenArgv(env, argv, argv+argc, &errno);
 MLActivate(link);

...

But I get the following build errors when I try to compile:

------ Build started: Project: smoothContour, Configuration: Debug Win32 ------

Compiling...
smoothContour.cpp
Linking...
smoothContour.obj : error LNK2019: unresolved external symbol 
_MLConnect@4 referenced in function _main
smoothContour.obj : error LNK2019: unresolved external symbol 
_MLOpenArgv@16 referenced in function _main
smoothContour.obj : error LNK2019: unresolved external symbol 
_MLInitialize@4 referenced in function _main
Debug/smoothContour.exe : fatal error LNK1120: 3 unresolved externals

Build log was saved at "file://c:\Documents and Settings\ryan\My 
Documents\Visual Studio Projects\smoothContour\Debug\BuildLog.htm"
smoothContour - 4 error(s), 0 warning(s)


---------------------- Done ----------------------

    Build: 0 succeeded, 1 failed, 0 skipped

I think that there is something wrong with my settings in Visual Studio. 
 Does anybody have any suggestions?

Thanks
Ryan Tibshirani



  • Prev by Date: Version differences in Integrate with Min[] in the integrand
  • Next by Date: Re: ploting functions slowly
  • Previous by thread: Re: Version differences in Integrate with Min[] in the integrand
  • Next by thread: Why are there no spaces in my title?