Mathlink
- To: mathgroup at smc.vnet.net
- Subject: [mg55977] Mathlink
- From: "Ryan Tibshirani" <ryantibs at stanford.edu>
- Date: Wed, 13 Apr 2005 01:10:01 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
Hi everyone.
I know that I already sent out an email with this exact question, but I
didn't get any responses, and I would really appreciate a response of
any kind. I pasted below the original question:
I am simply trying to get 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 very much,
Ryan Tibshirani
Stanford University
Class of 2007