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: <402C6D2E.20403@users.sourceforge.net> Date: Fri, 13 Feb 2004 01:22:38 -0500 From: Yaakov Selkowitz User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Building dll's and executables in same package References: <402C2069 DOT 7070403 AT users DOT sourceforge DOT net> <402C3B62 DOT 6000902 AT cwilson DOT fastmail DOT fm> In-Reply-To: <402C3B62.6000902@cwilson.fastmail.fm> X-Enigmail-Version: 0.83.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Authentication-Info: Submitted using SMTP AUTH at out001.verizon.net from [68.161.51.220] at Fri, 13 Feb 2004 00:22:41 -0600 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Charles Wilson wrote: | You might want to use automake+autoconf+libtool, instead of just | autoconf+libtool. Do I need to --force these? See below. |> 2) I added an empty main function to one of the src .c files: |> |> +int main () |> +{ return 0; } | | You don't need to do this. I got this from the Cygwin FAQ, regarding WinMain AT 16 errors. When I didn't do this, after autoconf and libtoolize, I still get: ~ gcc -Wl,--base-file,.libs/cygfribidi-0.dll-base - -Wl,-e,__cygwin_dll_entry AT 12 -o .libs/cygfribidi-0.dll fribidi.lo fribidi_types.lo fribidi_mem.lo fribidi_mirroring.lo fribidi_char_type.lo fribidi_wcwidth.lo fribidi_utils.lo fribidi_char_sets.lo fribidi_char_sets_utf8.lo fribidi_char_sets_cap_rtl.lo fribidi_char_sets_iso8859_6.lo fribidi_char_sets_iso8859_8.lo fribidi_char_sets_cp1255.lo fribidi_char_sets_cp1256.lo fribidi_char_sets_isiri_3342.lo /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../libcygwin.a(libcmain.o) (.text+0x7c): undefined reference to `_WinMain AT 16' collect2: ld returned 1 exit status make: *** [libfribidi.la] Error 1 | And make sure you're using a new(er) libtool/autoconf, like | autoconf-devel-2.59 and libtool-devel-1.5. $ cygcheck -c autoconf-devel automake-devel libtool-devel Cygwin Package Information Package Version Status autoconf-devel 2.59-1 OK automake-devel 1.7.9-1 OK libtool-devel 1.5-3 OK FWIW, I tried rebuilding clamav (which has a libclamav) by just adding - -no-undefined and the main() function, and both the dll and all executables dependent on it are built, but when I try running those programs they segfault with a STATUS_ACCESS_VIOLATION. When I automake/libtoolize without adding a main(), I get: ~ gcc -Wl,--base-file,.libs/cygclamav-1.dll-base - -Wl,-e,__cygwin_dll_entry AT 12 -o .libs/cygclamav-1.dll matcher.lo md5.lo others.lo readdb.lo cvd.lo dsig.lo str.lo scanners.lo unrarlib.lo zzip-dir.lo zzip-err.lo zzip-file.lo zzip-info.lo zzip-io.lo zzip-stat.lo zzip-zip.lo strc.lo blob.lo mbox.lo message.lo strrcpy.lo table.lo text.lo -lz -lbz2 .libs/libimp-cyggmp-3.a -lpthread /usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../libcygwin.a(libcmain.o) (.text+0x7c): undefined reference to `_WinMain AT 16' collect2: ld returned 1 exit status make[2]: *** [libclamav.la] Error 1 This whole thing of making DLLs is something that I would REALLY like to get figured out. Thanks! Yaakov -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFALG0spiWmPGlmQSMRAoDnAKDhpBVgFRfpMyfApjFNnc0e+5ze2gCg+/Gc 3O9VSeBukqpDQabl428Guq4= =McTI -----END PGP SIGNATURE----- -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/