This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: SDL on Cygwin


-----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@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@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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]