Why do I receive a linker error "LNK1181: cannot open input file 'odbc32.lib'" when trying to compile a MEX file with Microsoft's Platform SDK on Windows 64-bit using MATLAB 7.7 (R2008b)?

2 次查看(过去 30 天)
When I execute the following in MATLAB:
mex rainflow.c
I get the following error:
LINK : fatal error LNK1181: cannot open input file 'odbc32.lib'
C:\PROGRA~3\MATLAB\R2008b\BIN\MEX.PL: Error: Link of 'rainflow.mexw64' failed.
??? Error using ==> mex at 213
Unable to complete successfully.

采纳的回答

MathWorks Support Team
The file 'odbc32.lib' is not included in the 64-bit installation of the Platform SDK (Microsoft Windows Server 2003 R2 Platform SDK Web Install). To work around this issue, you will need to exclude this library from the linker command, to do this:
1. Execute the following command to open the MEX options file in the MATLAB editor:
edit(fullfile(prefdir, 'mexopts.bat'))
2. Search in the file for the entries 'odbc32.lib' and 'odbccp32.lib' and remove them from the LINKFLAGS variable.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

标签

尚未输入任何标签。

产品


版本

R2008b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by