Create .lib file with matlab compiler

조회 수: 11 (최근 30일)
Yoni
Yoni 2011년 8월 4일
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

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2011년 8월 4일
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)

카테고리

Help CenterFile Exchange에서 C Shared Library Integration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by