Cygwin1.dll

View: New views
5 Messages — Rating Filter:   Alert me  

Cygwin1.dll

by sroberts82 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,
Can someone help me understand this, its probably really straightforward but I can't find an answer for this.
Why is it when I build the most basic helloworld.exe and try and run it I get told of a dependancy on cygwin1.dll? Why do I need this dll, and what how do I build to avoid needing this?
Thanks.
Stephen

Re: Cygwin1.dll

by Brian Dessent :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

sroberts82 wrote:

> Can someone help me understand this, its probably really straightforward but
> I can't find an answer for this.
> Why is it when I build the most basic helloworld.exe and try and run it I
> get told of a dependancy on cygwin1.dll? Why do I need this dll, and what

When you build that program that calls printf("hello world"), where do
you think that implementation of printf comes from?  On linux you have a
libc.so, on Cygwin you have a cygwin1.dll, they are analogous.

> how do I build to avoid needing this?

You don't.  Or you use something other than Cygwin.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Re: Cygwin1.dll

by Charles D. Russell :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Brian Dessent wrote:

> sroberts82 wrote:
>
>> Can someone help me understand this, its probably really straightforward but
>> I can't find an answer for this.
>> Why is it when I build the most basic helloworld.exe and try and run it I
>> get told of a dependancy on cygwin1.dll? Why do I need this dll, and what
>
> When you build that program that calls printf("hello world"), where do
> you think that implementation of printf comes from?  On linux you have a
> libc.so, on Cygwin you have a cygwin1.dll, they are analogous.
>
>> how do I build to avoid needing this?
>
> You don't.  Or you use something other than Cygwin.
>

Not as drastic as it sounds.  Look at the compiler flag -mno-cygwin.
Very handy if you occasionally want to distribute executables without
cygwin1.dll.


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Re: Cygwin1.dll

by Brian Dessent :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Charles D. Russell" wrote:

> > You don't.  Or you use something other than Cygwin.
>
> Not as drastic as it sounds.  Look at the compiler flag -mno-cygwin.
> Very handy if you occasionally want to distribute executables without
> cygwin1.dll.

That would fall under "use something other than Cygwin" because you are
not using Cygwin any more in that case, you are using MinGW.  This means
you can't use any POSIX emulated functions.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Parent Message unknown Re: Cygwin1.dll

by Brian Dessent :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Reply to the mailing list, not to me.

sroberts82@... wrote:

> Hi Brian thank you very much for your answer.
> Why then, when I build with borland say, there is no such dependancy and I can just give that exe to anyone and it just works?

It still has a dependency on a C runtime library, it's just that that
library MSVCRT.DLL happens to be already installed in your Windows
directory so you can pretend that it's not there if you squint hard
enough.  You can achieve the same thing with gcc by using MinGW.  But as
I already said, this means using only the functions and APIs that
Windows provides, which means no POSIX emulation.

Brian

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/