Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3D0489DE.20904@netcom.es> Date: Mon, 10 Jun 2002 11:13:34 +0000 From: Ignasi Villagrasa Organization: gri User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; es-ES; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 X-Accept-Language: es-es MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: global instances in dll's Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi everyone, I'm trying to migrate an application from Watcom compiler to Cywin. Two parts compose the application: - An executable one, using a main function to run the program. - A dll. It receives petitions from the executable. This pair has been compiled and linked under Windows NT and W2000 using Watcom compiler without problems. But when I try to build the application under Cygwin, a problem arises. Basically, the problem is caused by several inherited global class instances, duplicated in executable and .dll programs. For instance: E (executable) calls B. B is a module that defines global instance C. D (dll) calls B. B defines global instance C also. In Watcom this instances become different in the executable and in the dll, but in cygwin I notice the instance is the same that I have in the executable file. This causes working problems, related to reentered destructors and not desired inherited information. Obviously, the desired situation would be to avoid global instances in order to completely encapsulate the program operation, but this requires too much study and time by now. The related software piece is an inherited one difficult to isolate. So at first I'd like to adapt the Cygwin program funcionality to the Watcom program one, and, after that , progress in module isolation. Is it possible, using any linker option, or modifier, to get the .dll working with global variables different instances that those in .exe ? Could anyone help me ? Thanks in advance. Ignasi Villagrasa. -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/