using setupapi.dll without libimp*.a file lazarus / 34-Windows ---------------------------------------------------------------------- josip · 2016-11-02 08:04 Program in FPC is executed from cmd prompt on Win. Some functions from setupapi.dll are used. In source code there are defined like this... Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i function SetupDiGetClassDevsA(ClassGuid: PGUID; const Enumerator: PAnsiChar;  hwndParent: HWND; Flags: DWORD): HDEVINFO; stdcall; external 'setupapi.dll'; function SetupDiEnumDeviceInfo(DeviceInfoSet: HDEVINFO; MemberIndex: DWORD;  var DeviceInfoData: TSPDevInfoData): LongBool; stdcall; external 'setupapi.dll'; ... Everything is working fine, but using dll functions generate libimp*.a file, that I don't want to have in program directory. Is there are any way to use or release dll without generating / leaving libimp*.a file. ---------------------------------------------------------------------- Cyrax · 2016-11-02 09:07 Are you using Lazarus to develop your app? Check out in Project->Project Options...->Compiler Options->Paths that Unit output directory have different value than Target file name text field have. ---------------------------------------------------------------------- josip · 2016-11-02 12:07 No Lazarus, just FPC. After program is compiled, every time when exe is started, libimp*.a file is generated (if it is erased before). ---------------------------------------------------------------------- Thaddy · 2016-11-02 12:32 Quote from: josip on November 02, 2016, 01:07:37 pmNo Lazarus, just FPC. After program is compiled, every time when exe is started, libimp*.a file is generated (if it is erased before). ???? That would be a - hidden? - feature. I don't think that is what you mean to tell us.  After compilation and linking your project the dependecies are resolved in the binary, the libimp for that executable is linked in and will never regenerate itself when you start that executable. . ---------------------------------------------------------------------- marcov · 2016-11-02 13:35 Thaddy is right. I think you somehow trigger recompilation when starting the exe and that that regeneration triggers the .a generation. ---------------------------------------------------------------------- josip · 2016-11-03 13:51 Thank you very much for clarification. I was wrong. libimp*.a and dummy.$$$ are generated during compiling, and not by executing generated exe file. Problem solved.