Create .lib file with matlab compiler

13 Ansichten (letzte 30 Tage)
Yoni
Yoni am 4 Aug. 2011
Hi,
I'm trying to compile a simple function with the matlab compiler (2007b).
the compilation ends with the following lines:
--------------------------------------------------
Copying: D:\...\src\MyLib.lib -> D:\...\distrib
Could not copy file to the output directory.
--------------------------------------------------
The .lib file is only available in the intermediate folder (\src). I'm able to load and call the function from the generated DLL but when I try to link to the .lib I get a runtime error when my application loads.
Any idea how to properly create a .lib?
Thanks,
Yoni

Antworten (1)

Kaustubha Govind
Kaustubha Govind am 4 Aug. 2011
I don't know that it is possible to create a static library using MATLAB Compiler. The .lib file that you see generated is the import library for the generated DLL - it needs to be used with the DLL. What is the runtime error that you see after linking against the .lib file? Is it about being unable to find the corresponding DLL? In that case, you should simply have to add the DLL to the system path.
(I'm not sure why the error about being unable to copy occurs)

Kategorien

Mehr zu C Shared Library Integration finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by