Windows系ではDLLを利用するために、
DLLファイルをシステム⇒詳細設定⇒環境⇒pathに所定DLLファイルの所在場所を設定しなければ、
APP起動の時点か、そのDLLをコールされる時点(遅延DLLの場合)がエラーになります。
LINUX系でのDLLを利用する場合もシステムのどっかに設定しておかなければならないのでしょう。
ご教授お願いします。
LINUX系のDLL利用はどうなるでしょうか
Re: LINUX系のDLL利用はどうなるでしょうか
ありがとうございます。
LINUX系ではDLLを探すためのデフォルトディレクトリーはないでしょうか。
またどうぞよろしくお願いします。
LINUX系ではDLLを探すためのデフォルトディレクトリーはないでしょうか。
またどうぞよろしくお願いします。
Re: LINUX系のDLL利用はどうなるでしょうか
DLL は Windows の用語で、Linux には存在しません。Shared Object のことだと推測すると、下記 ld.so のマニュアルに書いてある通りだと思います。/lib と /usr/lib がデフォルトのようです。
ld.so(8) - Linux manual page
http://man7.org/linux/man-pages/man8/ld.so.8.html
ld.so(8) - Linux manual page
http://man7.org/linux/man-pages/man8/ld.so.8.html
When resolving shared object dependencies, the dynamic linker first
inspects each dependency string to see if it contains a slash (this
can occur if a shared object pathname containing slashes was
specified at link time). If a slash is found, then the dependency
string is interpreted as a (relative or absolute) pathname, and the
shared object is loaded using that pathname.
If a shared object dependency does not contain a slash, then it is
searched for in the following order:
(中略)
o In the default path /lib, and then /usr/lib. (On some 64-bit
architectures, the default paths for 64-bit shared objects are
/lib64, and then /usr/lib64.) If the binary was linked with the
-z nodeflib linker option, this step is skipped.
オフトピック
Windows の DLL の場合は、環境変数の PATH よりも EXE と同じディレクトリにある DLL が優先されるはずです。