Re: [FAQ Alert, ping JDF!] RE: How to make DLLs in cygwin for MSVC and BCB

2005-07-10 Thread Joshua Daniel Franklin
On 6/22/05, Dave Korn wrote: > Original Message > >From: Brian Dessent > >Sent: 22 June 2005 16:36 > > > Patrick Rotsaert wrote: > > > >> I need to build a DLL in cygwin (I use a lot of POSIX functions), that I > >> can use in MSVC and Borland CBuilder apps. > > > > http://cygwin.com/faq/f

Re: How to make DLLs in cygwin for MSVC and BCB

2005-06-23 Thread Cliff Hones
Max Kaehn wrote: > On Thu, 2005-06-23 at 18:18 +0100, Dave Korn wrote: >> Sorry, but why isn't that 4k at the *TOP* of the stack? It sure looks >>that way to me, unless cygwin stacks grow upward! > > You're mixing the metaphors. :-) The top of a stack is where you push > something down onto the

RE: How to make DLLs in cygwin for MSVC and BCB

2005-06-23 Thread Gary R. Van Sickle
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Max Kaehn > Sent: Thursday, June 23, 2005 2:09 PM > To: cygwin@cygwin.com > Subject: RE: How to make DLLs in cygwin for MSVC and BCB > > On Thu, 2005-06-23 at 18:18 +0100, Dave

RE: How to make DLLs in cygwin for MSVC and BCB

2005-06-23 Thread Max Kaehn
On Thu, 2005-06-23 at 18:18 +0100, Dave Korn wrote: > Sorry, but why isn't that 4k at the *TOP* of the stack? It sure looks > that way to me, unless cygwin stacks grow upward! You're mixing the metaphors. :-) The top of a stack is where you push something down onto the stack. The bottom of th

RE: How to make DLLs in cygwin for MSVC and BCB

2005-06-23 Thread Dave Korn
Original Message >From: Max Kaehn >Sent: 23 June 2005 18:16 > You'll need to find some way to arrange that the 4K is available at > the bottom of the stack of your main thread for as long as you have > cygwin1.dll loaded. > --- > extern "C" int mainCRTStartup (); > > extern "C" int __

Re: How to make DLLs in cygwin for MSVC and BCB

2005-06-23 Thread Max Kaehn
On Thu, 2005-06-23 at 14:05 +0200, Patrick Rotsaert wrote: > Ok, but this was only a small test program to see if I manage to load > cygwin1.dll functions. > The plan is to do this in a DLL, later on. I guess cygwin_dll_init will > then have to be called in DllMain, yes? > But then, what happens

Re: How to make DLLs in cygwin for MSVC and BCB

2005-06-23 Thread Patrick Rotsaert
you should do all your argv processing before calling cygwin_dll_init(), because it will trash your argv and argc. Ok, but this was only a small test program to see if I manage to load cygwin1.dll functions. The plan is to do this in a DLL, later on. I guess cygwin_dll_init will then have to be

Re: [FAQ Alert, ping JDF!] RE: How to make DLLs in cygwin for MSVC and BCB

2005-06-22 Thread Brian Dessent
Patrick Rotsaert wrote: > No problem that my dll will fall under the GPL. > Just out of curiosity, does this also apply for applications that use my > DLL? As far as I understand it, "linking" as defined by the GPL is when you incorporate code into the running process space. If you keep them sep

Re: How to make DLLs in cygwin for MSVC and BCB

2005-06-22 Thread Max Kaehn
On Wed, 2005-06-22 at 18:17 +0200, Patrick Rotsaert wrote: > Loading the cygwin1.dll dynamically is certainly an option. I tried it, > although I'm not quite sure how to make sure I have "4K of scratch space > at the bottom of the stack", like the faq says. > My test program crashes once cygwin_

Re: [FAQ Alert, ping JDF!] RE: How to make DLLs in cygwin for MSVC and BCB

2005-06-22 Thread Patrick Rotsaert
Original Message From: Brian Dessent Sent: 22 June 2005 16:36 Patrick Rotsaert wrote: I need to build a DLL in cygwin (I use a lot of POSIX functions), that I can use in MSVC and Borland CBuilder apps. http://cygwin.com/faq/faq.html#TOC102 And, as far as I know, using cygwi

Re: How to make DLLs in cygwin for MSVC and BCB

2005-06-22 Thread Patrick Rotsaert
http://cygwin.com/faq/faq.html#TOC102 Note that this just references loading cygwin1.dll and getting it initialized. If you have your own DLL that depends on cygwin1.dll you will probably first have to load and initialize Cygwin, and then load your own DLL. Loading the cygwin1.dll dynamically

RE: [FAQ Alert, ping JDF!] RE: How to make DLLs in cygwin for MSVC and BCB

2005-06-22 Thread Dave Korn
Original Message >From: Corinna Vinschen >Sent: 22 June 2005 17:01 > On Jun 22 16:45, Dave Korn wrote: >> Note also that Cygwin is GPL'd software (as indeed are all other >> Cygwin-based libraries). That means that if your code links against the >> cygwin dll (and if your program is ca

Re: [FAQ Alert, ping JDF!] RE: How to make DLLs in cygwin for MSVC and BCB

2005-06-22 Thread Corinna Vinschen
On Jun 22 16:45, Dave Korn wrote: > " Download crt0.c from the cygwin website and include it in your sources. > Modify it to call my_crt0() instead of cygwin_crt0(). " > > for point 5, and then something like > > " Note that if you are using any other Cygwin-based libraries that you will > pro

[FAQ Alert, ping JDF!] RE: How to make DLLs in cygwin for MSVC and BCB

2005-06-22 Thread Dave Korn
Original Message >From: Brian Dessent >Sent: 22 June 2005 16:36 > Patrick Rotsaert wrote: > >> I need to build a DLL in cygwin (I use a lot of POSIX functions), that I >> can use in MSVC and Borland CBuilder apps. > > http://cygwin.com/faq/faq.html#TOC102 > And, as far as I know, using

Re: How to make DLLs in cygwin for MSVC and BCB

2005-06-22 Thread Brian Dessent
Patrick Rotsaert wrote: > I need to build a DLL in cygwin (I use a lot of POSIX functions), that I > can use in MSVC and Borland CBuilder apps. http://cygwin.com/faq/faq.html#TOC102 Note that this just references loading cygwin1.dll and getting it initialized. If you have your own DLL that depe

How to make DLLs in cygwin for MSVC and BCB

2005-06-22 Thread Patrick Rotsaert
Hi all, I need to build a DLL in cygwin (I use a lot of POSIX functions), that I can use in MSVC and Borland CBuilder apps. There are a lot of docs on the web, but most of them seem to be outdated. Anyway, none of the methods I found seam to work. The DLL will have to be loaded dynamically,