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 X-Sent: 20 Jan 2001 20:26:12 GMT From: "Kevin Wright" To: "Cygwin-Mailing-List" Subject: Need help compiling glib's libgmodule DLL (gmodule-dl.c) Date: Sat, 20 Jan 2001 12:28:44 -0700 Message-ID: <008a01c08317$34330820$e088f726@holstein-mobile.ASPECTDV.COM> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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 V4.72.3612.1700 Importance: Normal Hello, For quite a while now, I've been trying to run gnome under cygwin. This requires getting libgmodule to compile as a DLL (gmodule is part of glib). I thought we had a breakthrough when "Edward ?" posted the following last December 6th: (http://cygwin.com/ml/cygwin/2000-12/msg00313.html) edward> gmodule works for me. edward> ugh. with spelling errors and all from the cvs source :) edward> um. i did have to patch gmodule-dl.c and testgmodule.c edward> um. and gdate.c and gmarkup.c and gstrfuncs.c edward> and I did have to make tons of changes to the automake/libtool edward> files to get the dll to build correctly. I've tried to reproduce this with no luck and my emails to Edward have gone unanswered. I patched to the cvs source with Edward's patch but he also made many changes to the libtool and automake which allowed him to create the DLL's which he didn't post. I'm trying to do this by hand with some success. Here's what I did to create the dll: 1) dlltool --export-all --output-def libgmodule_.def --dllname \ libgmodule-1.3.dll gmodule.o 2) gcc -shared -Wl,--enable-auto-image-base -o libgmodule-1.3.dll \ -Wl,--out-implib=libgmodule-1.3.a libgmodule_.def *.o -L../libs \ -lglib-1.3 Here's the error I get when I run testgmodule: /usr/local/src/glib/gmodule/ ./testgmodule.exe testgmodule (/usr/local/src/glib/gmodule): get main module handle check that not yet bound symbols in shared libraries of main module are retrievable: retrive symbol `g_module_close' from "main": error: `g_module_close': dlsym: Win32 error 127 Here's the output of cygcheck testgmodule.exe: .\testgmodule.exe C:\WINNT\System32\cygwin1.dll C:\WINNT\System32\KERNEL32.dll C:\WINNT\System32\ntdll.dll .\libglib-1.3.dll .\libgmodule-1.3.dll So, if anyone has managed to do this, (create DLL's via automake and libtool without having to create them by hand) I'd like to know how. Also, I'd like to know whether I'm creating the DLL's properly. It's possible that the problem is with the testgmodule program. It's been updated in the cvs source since Edward posted his patch. NOTE: I just found one of the problems I'm having is that the makefile compiles gmodule.c instead of gmodule-dl.c (one of the files Edward supplied a patch for) I assume this is the reason for my error. However, when I try to compile gmodule-dl.c, I get tons of errors: /usr/local/src/glib/gmodule/ make gmodule-dl gcc -g -O2 -Wall -D_REENTRANT gmodule-dl.c -o gmodule-dl gmodule-dl.c:75: parse error before `find_in_any_module_using_toolhelp' gmodule-dl.c:75: warning: type defaults to `int' in declaration of `gchar' gmodule-dl.c:75: parse error before `*' gmodule-dl.c:76: warning: return-type defaults to `int' gmodule-dl.c: In function `find_in_any_module_using_toolhelp': gmodule-dl.c:91: `gpointer' undeclared (first use in this function) gmodule-dl.c:91: (Each undeclared identifier is reported only once gmodule-dl.c:91: for each function it appears in.) gmodule-dl.c:91: parse error before `p' gmodule-dl.c:97: warning: return makes integer from pointer without a cast gmodule-dl.c:104: warning: return makes integer from pointer without a cast gmodule-dl.c:108: warning: return makes integer from pointer without a cast gmodule-dl.c:111: `p' undeclared (first use in this function) gmodule-dl.c:115: `symbol_name' undeclared (first use in this function) gmodule-dl.c:123: warning: control reaches end of non-void function [more errors/warnings deleted] I assume that this means that either I've patched the file incorrectly or am missing something else. Again, if anyone has managed to make this work, please post how you accomplished this. I'm sure you would make a lot of people very happy. (myself included) TIA, --Kevin Wright ============================================================================ -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple