From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Robin Hu Newsgroups: gmane.emacs.devel Subject: Re: How about using static link instead of dynamic loaded dlls? Date: Thu, 05 Jun 2003 10:57:18 +0000 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1054813086 11681 80.91.224.249 (5 Jun 2003 11:38:06 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 5 Jun 2003 11:38:06 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Thu Jun 05 13:38:04 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19Nt4G-000320-00 for ; Thu, 05 Jun 2003 13:38:04 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19NtMI-00081X-00 for ; Thu, 05 Jun 2003 13:56:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19Nt43-0002Rt-D1 for emacs-devel@quimby.gnus.org; Thu, 05 Jun 2003 07:37:51 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.20) id 19Nt1G-0001cX-Tk for emacs-devel@gnu.org; Thu, 05 Jun 2003 07:34:58 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.20) id 19Nt0Z-0001HQ-0B for emacs-devel@gnu.org; Thu, 05 Jun 2003 07:34:16 -0400 Original-Received: from [210.77.38.126] (helo=ns.turbolinux.com.cn) by monty-python.gnu.org with esmtp (Exim 4.20) id 19NsQm-0003N6-Qb; Thu, 05 Jun 2003 06:57:17 -0400 Original-Received: from LOADLIN (gateway.cn.tlan [210.74.191.34]) (authenticated bits=0) by ns.turbolinux.com.cn (8.12.5/8.12.5) with ESMTP id h55Av0kG009983; Thu, 5 Jun 2003 18:57:05 +0800 Original-To: Jason Rumney In-Reply-To: (Jason Rumney's message of "05 Jun 2003 07:53:49 +0100") User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (windows-nt) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:14751 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:14751 >>>>> "Jason" == Jason Rumney writes: Jason> If you explain what problems you are having, we may be able Jason> to fix them. Linking the image libraries statically might Jason> work well for people like yourself who compile Emacs Jason> yourself, but in the Windows world you are the minority I am Jason> afraid, so linking dynamically is more flexible for binary Jason> distribution. Well. The problems I have are really problems of lacking of version control for dll files. These image libraries(libtiff, libungif, libxpm, libjpeg, libpng) are also used by GTKWin32 and some other gnu softwares which are ported to mswin. Then: 1/ These dlls are not binary compatible, so I must choose which dll file to use when start a program, which means I have to tune my %PATH% frequently just to make programs happy. 2/ Dlls compiled by gcc may not cooperate well with programs compiled by msvc. When I used libjpeg from sf.net/projects/gnuwin32, Emacs compiled by msvc failed to open jpeg files. These problems, I think, can not be eliminated without a modification to the dll mechanism. Jason> Please explain. It is very rare to find a bug in a compiler Jason> these days. More often it is a particular optimization that a Jason> compiler does that show up a subtle bug in the code. While compiling with msvc with optimization turned on, Emacs will emit an access vilation exception while load a tiff file or a png file. I believe the problem is something related to lookup_image(), but debug an optimized program is really hard. ;-(