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)?

7 views (last 30 days)
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.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 15 May 2010
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.

More Answers (0)

Categories

Find more on C Shared Library Integration in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2008b

Community Treasure Hunt

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

Start Hunting!