delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/03/23/13:44:31

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
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: <40608519.6090802@users.sourceforge.net>
Date: Tue, 23 Mar 2004 13:42:33 -0500
From: Yaakov Selkowitz <yselkowitz AT users DOT sourceforge DOT net>
User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: SDL on Cygwin
References: <405F449C DOT 3020201 AT users DOT sourceforge DOT net> <Pine DOT LNX DOT 4 DOT 58 DOT 0403221742260 DOT 14112 AT pervalidus DOT dyndns DOT org> <405F5C82 DOT 8020006 AT users DOT sourceforge DOT net>
In-Reply-To: <405F5C82.8020006@users.sourceforge.net>
X-Enigmail-Version: 0.83.2.0
X-Enigmail-Supports: pgp-inline, pgp-mime
X-Authentication-Info: Submitted using SMTP AUTH at out008.verizon.net from [68.160.196.102] at Tue, 23 Mar 2004 12:42:34 -0600

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I wrote:
| Well, it doesn't give a choice as I said, it uses the -mno-cygwin flag
| by default when building in Cygwin.  I believe the libSDLmain.a is their
| way of avoiding the _WinMain AT 16 issue, but it shouldn't be necessary
| with the current autotool-devel packages (and I did autoreconf before
| building this).
|
| So again, how can SDL be build WITHOUT -mno-cygwin, and what does one do
| with this libSDLmain.a?

Well, here's what I've got so far:

The -mno-cygwin and libSDLmain business was all coming from
configure.in, and I changed all that, then reautotooled.  The dll
(cygSDL-1-2-0.dll) builds fine, and it is linked to cygwin1.dll, but
when I try to link something else to SDL, I get the following:

gcc  -g -O2 -I/usr/include/SDL -I/usr/include -DWIN32 -Uunix
- -DHAVE_OPENGL   -o testver.exe  testver.o  -L/usr/lib -lSDL -mwindows -e
_WinMainCRTStartup
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../../i686-pc-cygwin/bin/ld:
warning: cannot find entry symbol _WinMainCRTStartup; defaulting to 00401000
/usr/lib/libcygwin.a(libcmain.o)(.text+0x7c): undefined reference to
`_WinMain AT 16'
collect2: ld returned 1 exit status

What I don't understand is why I'm getting undefined reference errors
when linking an .exe; this usually happens when linking a .dll w/o the
current libtool-devel stuff.

I have previously built FOX toolkit with w32api, and I remember that it
called -mwindows -e _WinMainCRTStartup, and I tried linking the dll with
and without these flags and I still get the same results.

Now does anyone have any ideas?

Yaakov
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFAYIUXpiWmPGlmQSMRAnwfAKCnFnyP3akt1a2E7jzKYHwhgosCiACg8XB8
Wyha6LgAef4QUv0HhmjED6Q=
=8xBt
-----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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019