Create .lib file with matlab compiler

11 vues (au cours des 30 derniers jours)
Yoni
Yoni le 4 Août 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

Réponses (1)

Kaustubha Govind
Kaustubha Govind le 4 Août 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)

Catégories

En savoir plus sur C Shared Library Integration dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by