MathGroup Archive 2010

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

Search the Archive

MathLink error

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114032] MathLink error
  • From: "tarpanelli at libero.it" <tarpanelli at libero.it>
  • Date: Sat, 20 Nov 2010 18:28:26 -0500 (EST)
  • Reply-to: "tarpanelli at libero.it" <tarpanelli at libero.it>

Hello, 
I'm trying to link Mathematica to an external c++ lib using the following 
script from command prompt:

SET CL=/nologo /I "C:\QuantLib\QuantLib-1.0.1" /I "C:\Boost\boost_1_43" /c 
/DWIN32 /D_WINDOWS /W3 /O2 /DNDEBUG

SET LINK=/NOLOGO /SUBSYSTEM:windows /INCREMENTAL:no /PDB:NONE /LIBPATH:"C:
\QuantLib\QuantLib-1.0.1\lib" QuantLib-vc80-mt-s.lib kernel32.lib advapi32.lib 
user32.lib gdi32.lib winspool.lib comdlg32.lib shell32.lib ole32.lib oleaut32.
lib uuid.lib odbc32.lib odbccp32.lib opengl32.lib glu32.lib glaux.lib

MPREP QL.tm -o QLtm.cpp

CL QL.cpp QLtm.cpp

LINK QL.obj QLtm.obj ml32i3m.lib /OUT:QL.exe

It seems everithing goes well till the last command where I get the following 
error:

C:\QLMma\QL\QLibMma>LINK QL.obj QLtm.obj ml32i3m.lib /OUT:QL.exe
QLtm.obj : error LNK2019: unresolved external symbol "void __cdecl 
qlBusinessDay
Q(int *,long,int *,long,int)" (?qlBusinessDayQ@@YAXPAHJ0JH@Z) referenced in 
func
tion "int __cdecl _tr0(struct MLink *)" (?_tr0@@YAHPAUMLink@@@Z)
QLtm.obj : error LNK2019: unresolved external symbol "void __cdecl qlShiftDate
(i
nt *,long,int *,long,int *,long,int)" (?qlShiftDate@@YAXPAHJ0J0JH@Z) 
referenced
in function "int __cdecl _tr1(struct MLink *)" (?_tr1@@YAHPAUMLink@@@Z)
QL.exe : fatal error LNK1120: 2 unresolved externals

Any suggestion is appreciated...

Paolo


  • Prev by Date: Re: Mathematica 8 "natural language" capabilities
  • Next by Date: Re: Mathematica 8 "natural language" capabilities
  • Previous by thread: Finding a function that makes it possible to Solve[ ] a system of equations
  • Next by thread: One more rules + evaluation control problem