This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: C program compilation. Needed .dll's for .exe.
- From: Julio Costa <costaju at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Wed, 26 May 2010 11:22:45 +0100
- Subject: Re: C program compilation. Needed .dll's for .exe.
- References: <4BFC89CB.1010602@gmail.com>
On Wed, May 26, 2010 at 03:39, Kaylan wrote:
> OS: Windows 7
> cygwin installation: Basic C/C++ compilation,debug,link,make,ect
>
>
> I have searched all over for answers and have came up with nothing. When i
> compile a C program i now know i need to include some .dll's with the .exe
> in order for it to run on a remote machine. At least thats been the case so
> far. I used the command cygcheck to see what .dll's i need to include with
> my .exe and i get this big list. So my question(s) is, Do i really need to
> include all those .dll's? Is there anyway to make the .exe independent? Are
> there any shortcuts to manually including all those .dll's in a distribution
> folder with the .exe?
>
Short Answer: No.
Although you can compile statically most of the libs, cygwin1.dll is
not possible to include in the executable. There are technical
reasons, and also licencing reasons. Please see:
http://cygwin.com/faq/faq-nochunks.html#faq.programming.static-linking
> What about simply including the cygwin setup with my software? Then what
> would need to be installed on the remote machine to simply RUN applications
> compiled with cygwin?
>
You don't need necessarily to distribute the setup.exe, or build a
cygwin package. You can do as probably you already are doing: "gather"
the needed Dll's (only those specific to Cygwin, of course), join the
.exe, and include the source, (as this is required by the licencing),
and just drop it together in a directory on the client PC's.
> Any help what so ever is greatly appreciated.
>
Regards,
___________
Julio Costa
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple