Thread Subject: calling matlab libraries

Subject: calling matlab libraries

From: Bill

Date: 6 Mar, 2009 16:11:01

Message: 1 of 2

All,

I am building a Fortran project with MS Visual Studio. I link in lbmx.lib, libmat.lib and libdflapack.lib. It builds and runs fine. Now I want to duplicate this effort on a different PC that does NOT have Matlab installed. So I have copied the VS project folders over to the other PC and rebuilt the project there. That works! Unhappily, when I go to run my test case it tells me that it cannot find libmx.dll. I have included all 6 files in my project, to wit:

lbmx.lib
libmat.lib
libdflapack.lib
lbmx.dll
libmat.dll
libdflapack.dll

and have stored copies of them in the project folder. Sooooooo I reasoned that maybe the dll's needed to be in the Matlab root path. I created "C:\Program Files\MATLAB\R2008b\bin\win32" and stored the 3 dll's there. No effect. Do I need to perhaps create a Matlab "path" variable on the other PC? Or, is there something else that I am missing here?

TIA,

Bill

Subject: calling matlab libraries

From: Bill

Date: 6 Mar, 2009 17:06:02

Message: 2 of 2

Well, I have made some progress. I am now finding a seemingly endless chain of DLL's that need to be placed in ""C:\Program Files\MATLAB\R2008b\bin\win32" because of the calls into "libdflapack.dll". Soooo now I am thinking that if I could package everything up into one big DLL or EXE life would be simpler. For instance, I could write a little Matlab function that calls something in libdflapack and then use the "deploytool" to create an EXE. However, I am not sure that I can make the same function calls into an EXE as though it were a DLL.

Any thoughts?

Bill


> I am building a Fortran project with MS Visual Studio. I link in lbmx.lib, libmat.lib and libdflapack.lib. It builds and runs fine. Now I want to duplicate this effort on a different PC that does NOT have Matlab installed. So I have copied the VS project folders over to the other PC and rebuilt the project there. That works! Unhappily, when I go to run my test case it tells me that it cannot find libmx.dll. I have included all 6 files in my project, to wit:
>
> lbmx.lib
> libmat.lib
> libdflapack.lib
> lbmx.dll
> libmat.dll
> libdflapack.dll
>
> and have stored copies of them in the project folder. Sooooooo I reasoned that maybe the dll's needed to be in the Matlab root path. I created "C:\Program Files\MATLAB\R2008b\bin\win32" and stored the 3 dll's there. No effect. Do I need to perhaps create a Matlab "path" variable on the other PC? Or, is there something else that I am missing here?
>
> TIA,
>
> Bill

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
matlab compiler Bill 6 Mar, 2009 12:10:20
fortran Bill 6 Mar, 2009 11:15:19
matlab Bill 6 Mar, 2009 11:15:19
rssFeed for this Thread

Contact us at files@mathworks.com