Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com From: "Ralf Habacker" To: "Cygwin" Subject: AW: Status of cygwin KDE project - beta version of dll based qt 2.3.0 library is running Date: Mon, 14 May 2001 16:54:19 +0200 Message-ID: <004501c0dc85$c1383020$6e032bb7@BRAMSCHE> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0046_01C0DC96.84C10020" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook 8.5, Build 4.71.2173.0 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal In-Reply-To: <003d01c0dc80$56ae1df0$0200a8c0@lifelesswks> ------=_NextPart_000_0046_01C0DC96.84C10020 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit > Von: Robert Collins [mailto:robert DOT collins AT itdomain DOT com DOT au] > Gesendet am: Montag, 14. Mai 2001 16:16 > An: Ralf Habacker; Cygwin > Cc: Alan Hourihane > Betreff: Re: Status of cygwin KDE project - beta version of dll based qt > 2.3.0 library is running > > Could you provide the source for your DLLMain? > > Rob > Here is it. (It coms from libtool) Note that there is a definition of WinMain because I have single libs which need this. Perhaps you can eliminate this. Note that I've used this compile/link command. libname - basic lib name without extension libobjs - means the object files to integrae into the lib deplibs - means all libs where this lib depends off g++ -c ltdll.c g++ -shared -nostartfiles -Wl,-e,_DllMain AT 12 -Wl,--out-implib,$(libname).dll .a -o $(libname).dll -Wl,--whole-archive $(libobjs) ltdll.o -Wl,--no-whole-archive $(deplibs) Regards Ralf Habacker EMail: Ralf AT habacker DOT de Ralf DOT Habacker AT saght DOT tessag DOT com > ----- Original Message ----- > From: "Ralf Habacker" > To: "Cygwin" > Cc: "Alan Hourihane" > Sent: Monday, May 14, 2001 11:46 PM > Subject: AW: Status of cygwin KDE project - beta version of dll based qt > 2.3.0 library is running > > > > Hi Alan, > > > > in the last mail I have written, that you only need -shared to > generate such > > a lib. > > > > For big libs with C++ code such kde I have used a special startup > routine > > DLLMain which does some cygwin specific initialisations in libs. > > Without that, an segment violation occurred on exiting such > applications. > > Perhaps there is another way I dont know about. > > > > At second I've used .... -Wl,--whole archive > $(OBJS) -Wl,--no-whole-archive > > $(DEPENDED_LIBS) .... command parameters to import all symbols in my > object > > files, otherwise the linker eliminates not used functions. > > > > Regards > > > > Ralf Habacker > > EMail: Ralf AT habacker DOT de > > Ralf DOT Habacker AT saght DOT tessag DOT com > > > > > -----Ursprüngliche Nachricht----- > > > Von: Alan Hourihane [mailto:alanh AT fairlite DOT demon DOT co DOT uk] > > > Gesendet am: Donnerstag, 10. Mai 2001 11:42 > > > An: Ralf Habacker > > > Betreff: Re: Status of cygwin KDE project - beta version of dll > based qt > > > 2.3.0 library is running > > > > > > On Wed, May 09, 2001 at 03:37:28PM +0200, Ralf Habacker wrote: > > > > Hi, > > > > I have check this too and my client programm runs > > > > > > > > $ ./client > > > > Dll sees var=123 > > > > we see var=123 > > > > setting var=456 > > > > Dll sees var=456 > > > > we see var=456 > > > > > > > > Dll sees var=90 > > > > we see var=90 > > > > > > > > Dll sees foo=9 > > > > we see foo=9 > > > > setting foo=19 > > > > Dll sees foo=19 > > > > we see foo=19 > > > > > > > > Calling dllimported function pointer: > > > > Dll sees foo=19 > > > > > > > Thanks Ralf. > > > > > > When you build KDE, are there any other options you pass to the > linker > > > apart from -Wl,--imp-outlib,libxxx.a ? > > > > > > Do you enable '--enable-auto-image-base' or '--enable-dynamic' ? > > > > > > Alan. > > > > > > > > > -- > > Want to unsubscribe from this list? > > Check out: http://cygwin.com/ml/#unsubscribe-simple > > > > > > ------=_NextPart_000_0046_01C0DC96.84C10020 Content-Type: application/octet-stream; name="ltdll.c" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ltdll.c" =0A= #define WIN32_LEAN_AND_MEAN=0A= #include =0A= #undef WIN32_LEAN_AND_MEAN=0A= #include =0A= =0A= #ifdef __cplusplus=0A= extern "C" {=0A= #endif =0A= =0A= BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);=0A= =0A= #include =0A= DECLARE_CYGWIN_DLL( DllMain );=0A= HINSTANCE __hDllInstance_base;=0A= #ifdef __cplusplus=0A= }=0A= #endif =0A= =0A= BOOL APIENTRY=0A= DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)=0A= {=0A= __hDllInstance_base =3D hInst;=0A= return TRUE;=0A= }=0A= =0A= int APIENTRY WinMain(HINSTANCE,HINSTANCE,LPSTR,int)=0A= {=0A= return 0;=0A= }=0A= =0A= ------=_NextPart_000_0046_01C0DC96.84C10020 Content-Type: text/plain; charset=us-ascii -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple ------=_NextPart_000_0046_01C0DC96.84C10020--