I have compiled the following code 'http://www.shivakar.com/programming/creating-matlab-mex-function-for-postgresql-database-connectivity/' using visual C++ compiler to create a mex32 file. When I try to run a MEX-file I created, I receive the following error: ??? Invalid MEX-file 'MEX-file name': The specified module could not be found. where "MEX-file name" is the name of my MEX-file. However, I did not receive any errors when compiling the file.
I used dependecywalker to check the dll depedency and it shows the 'libmx.dll and libmex.dll' missing. Thereafter I have added the path 'C:\Program Files\MATLAB\R2011a\bin\win32' where these dlls reside and also tried to add these dlls directly to the folder of the mex function but I am still getting the same error.
please help me how can I attach these dlls to my mex function.