From: giac AT dalim DOT de ("Philippe GIACINTI") Subject: exported variables from dll ... 18 Jun 1997 02:05:52 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <9706181002.ZM17064.cygnus.gnu-win32@pion.kehl.dalim.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Face: ^cJc2\tiS@#Ja AT 7laz+N]T)kL{-Kay)Oz"?}p[wuY#}}dO"enP!QVO{,}&4P2V[hEfJD]9& E1ou~|tY/|9d&7c,7yf>7n: Zj8FD(LtPXWHzy^OJIDi/~O~R]3x/5}"7P;|,*%f:3Z!>h8Ff/&)g?/ }$RXQ X-Mailer: Z-Mail (3.2.3 08feb96 MediaMail) Original-To: colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp Original-Cc: gnu-win32 AT cygnus DOT com Original-Sender: owner-gnu-win32 AT cygnus DOT com Dear Colin, Thank you for your help, your workaround works fine and I can continue my porting ... * Anyway I have some general remarks : - I had problems only with exported variables from cygwin.dll ( stdout, stdin through _impure_ptr, ... ). I my point of view exporting a variable from a dll ( or from a shared library on Unix ) is really a bad thing which must be replaced by a call to a function ( or C++ method ) which returns the variable. So the problem is solved for my code ( may be not for inline methods ... ), and I will try to modify includes files which define _impure_ptr ... - May be, it could be cool to modify the linker the following way : If the linker doesn't find the symbol "foo", it try to resolve it with __imp_foo so dlltool doesn't have to generate dummy functions and it will work for variables ... It's just an idea, I don't know how the linker works and what it implies in term of work. * and I have always some troubles : - I tried to use a dll generated with Cygwin32 directly in Visual C++, but I had a problem with ( probaly ) the initialization of cygwin.dll. Because my application is linked by VC++ the crt0 init code is not called, and the global variable "u" which represent the current process is not initialized. Question : is it possible to let the cygwin.dll initalize itself ? - I have a problem with generated C++ code beetween Cygwin32 and VC++ because decorations are different. Question: is it possible to have the same C++ decoration as VC++ in g++ ? Thanks for your help -- ========================================================================== | Philippe GIACINTI | | | | DALiM GmbH R&D email: giac AT dalim DOT de | | Daimler Strasse 2, tel: +49.7851.9196-28 | | D-77694 Kehl-Sundheim Germany fax: +49.7851.73576 | | | ========================================================================== - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".