LNK1181: cannot open input file "kernel32.lib"

Asked by Ajith on 5 Feb 2013
Latest activity Answered by Renish Ramegowda on 18 Apr 2013

When I am building the SFunction I am building with Microsoft Visual C++ 6.0 I am getting S function builder LINK : fatal error LNK1181: cannot open input file "kernel32.lib". When I checked the path C:\Program Files\Microsoft Visual Studio\VC98\Lib I found "kernel32.lib" Can any one suggest me how to resolve this error.Any additional setting I have to do?

Regards Ajith

1 Comment

Ajith on 5 Feb 2013

Hi anyone know what settings we have to do for this?

Ajith

Products

No products are associated with this question.

1 Answer

Answer by Renish Ramegowda on 18 Apr 2013
Edited by Renish Ramegowda on 18 Apr 2013

Hi Ajith,

Please follow the below steps and you can resolve the issue.

When you run >> mex -setup command on your command window, file mexopts.bat placed in the path "C:\Documents and Settings\users\Application Data\MathWorks\MATLAB\R2011a" gets updated.

If you open this file with wordpad, you can observe the below instruction under the section "General Parameters" set VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio\VC98\

Just modify the instruction as shown below and save the file

set VSINSTALLDIR=C:\Program Files\Microsoft Visual Studio\

Now try to build the SFunction. The error will be resolved. This is a temporary solution. Next time you run the >> mex -setup command, the error reappears :)

Now you can repeat the above steps once again to get rid of the issue

0 Comments

Renish Ramegowda

Contact us