This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Including full path to shared library in the executable file

On May 21 21:43, Balaji Venkataraman wrote:
> On Tue, May 21, 2013 at 9:19 PM, Balaji Venkataraman wrote:
> > My question is whether there is a way to include the full path to the .dll
> > while creating the .exe - much like how cmake "link_directories" or
> > "target_link_libraries" allows you to - for e.g. on Linux (an ldd on the
> > executable file shows the full path to the .so file and thus
> > precludes the need to explicitly set LD_LIBRARY_PATH). While this is not a
> > cmake question (or a cmake mailing list) if you have experience solving
> > this problem using cmake, would appreciate those insights as well.
> I found this while looking for cygwin RPATH:
> Perhaps
> the lack of RPATH support on Windows/Cygwin is the reason?

RPATH is an ELF feature.  Full paths to DLLs are not supported by the
PE/COFF executable format.  Also, Cygwin DLLs are still loaded by the
Windows loader, so POSIX paths won't work, and full Windows paths won't
make much sense, given that Cygwin is not always installed into

The solution for this would be an ELF loader in Cygwin and a Cygwin
linker which produces ELF DLLs by default.  But that's quite a big
project on its own and nobody seemed to have fun, time, or money, to
implement this.


Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

Problem reports:
Unsubscribe info:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]