Message Boards Message Boards

0
|
1679 Views
|
0 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Trouble building mathlink.pyd for Python 2.7on windows using Mathematica 10

Posted 10 years ago

Evidently, the mathlink Python extension has not been updated for some time. As shown below, it doesn't link to the correct libraries. Also, the API seems to have been updated while the mathlink source code has not.

    C:\Program Files\Wolfram Research\Mathematica\10.0\SystemFiles\Links\Python
    >python setup.py build
    running build
    running build_ext
    building 'mathlink' extension
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\cl.exe /c /nologo /Ox
     /MD /W3 /GS- /DNDEBUG -DWINDOWS_MATHLINK "-IC:\Program Files\Wolfram Research\M
    athematica\10.0\SystemFiles\Links\MathLink\DeveloperKit\Windows\CompilerAddition
    s\mldev32\include" -Ic:\Python27\include -Ic:\Python27\PC /Tcmathlink.c /Fobuild
    \temp.win32-2.7\Release\mathlink.obj
    mathlink.c
    mathlink.c(1473) : warning C4013: 'MLDisownByteString' undefined; assuming exter n returning int
    mathlink.c(1555) : warning C4013: 'MLDisownString' undefined; assuming extern returning int
    mathlink.c(1885) : warning C4013: 'MLDisownSymbol' undefined; assuming extern returning int
    mathlink.c(2094) : warning C4013: 'MLDisownIntegerList' undefined; assuming extern returning int
    mathlink.c(2167) : warning C4013: 'MLDisownRealList' undefined; assuming extern returning int
    mathlink.c(2238) : warning C4013: 'MLDisownIntegerArray' undefined; assuming extern returning int
    mathlink.c(2259) : warning C4013: 'MLDisownRealArray' undefined; assuming extern returning int
    mathlink.c(3861) : warning C4047: 'function' : 'unsigned long' differs in levels of indirection from 'MLParametersPointer'
    mathlink.c(3861) : warning C4024: 'MLNewParameters' : different types for formal and actual parameter 1
    mathlink.c(3861) : warning C4020: 'MLNewParameters' : too many actual parameters 
    mathlink.c(3861) : warning C4047: '=' : 'ulong_ct' differs in levels of indirect ion from 'MLEnvironmentParameter'
    C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\link.exe /DLL /nologo
     /INCREMENTAL:NO "/LIBPATH:C:\Program Files\Wolfram Research\Mathematica\10.0\Sy
    stemFiles\Links\MathLink\DeveloperKit\Windows\CompilerAdditions\mldev32\lib" /LI
    BPATH:c:\Python27\libs /LIBPATH:c:\Python27\PCbuild ml32i3m.lib /EXPORT:initmath
    link build\temp.win32-2.7\Release\mathlink.obj /OUT:build\lib.win32-2.7\mathlink
    .pyd /IMPLIB:build\temp.win32-2.7\Release\mathlink.lib /MANIFESTFILE:build\temp.
    win32-2.7\Release\mathlink.pyd.manifest Creating library build\temp.win32-2.7\Release\mathlink.lib and object build\temp.win32-2.7\Release\mathlink.exp
    mathlink.obj : error LNK2019: unresolved external symbol _MLDisownByteString referenced in function _mathlink_GetLong
    mathlink.obj : error LNK2019: unresolved external symbol _MLDisownString referenced in function _mathlink_GetString
    mathlink.obj : error LNK2019: unresolved external symbol _MLDisownSymbol referenced in function _mathlink_GetSymbol
    mathlink.obj : error LNK2019: unresolved external symbol _MLDisownIntegerList referenced in function _mathlink_GetIntegerList
    mathlink.obj : error LNK2019: unresolved external symbol _MLDisownRealList referenced in function _mathlink_GetFloatList
    mathlink.obj : error LNK2019: unresolved external symbol _MLDisownIntegerArray referenced in function _mathlink_GetIntArray
    mathlink.obj : error LNK2019: unresolved external symbol _MLDisownRealArray referenced in function _mathlink_GetFloatArray
    mathlink.obj : error LNK2019: unresolved external symbol _MLNewParameters@8 referenced in function _Env_Alloc
    build\lib.win32-2.7\mathlink.pyd : fatal error LNK1120: 8 unresolved externals
    error: command '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\link
    .exe"' failed with exit status 1120

Any help greatly appreciated!

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract