At run time the application current dir is the exe folder, at design time then component presume this is current directory. Ide have to simulate this beaviour.
You should be aware that this behavior only occurs on Microsoft Windows, and Lazarus runs on several other operating systems.
Similarly, if you code relies on getting the executable's directory, it will only work on Windows.
In windows the first implicit folder to reseach a dll is the application folder. no need to add to the sistem path if a application bind a dll in his folder. That mean my file.exe have no problem at run time but at design time the component have a binding problem.
Ok, I think I understand better now.
So, you are statically linking to the library?
I have a possible solution: Load the library dynamically, using LoadLibrary, GetProcAddress and FreeLibrary, from unit dynlibs:
http://www.freepascal.org/docs-html/rtl/dynlibs/index-5.htmlAlso, detect if your component is at design-time, and if so, do not load the library. Do you really need it's functionality at design-time?