libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Using libtool via autotools causes linking problem on mingw


From: Panicz Maciej Godek
Subject: Re: Using libtool via autotools causes linking problem on mingw
Date: Fri, 8 Nov 2013 11:49:44 +0100

2013/11/8 Václav Zeman <address@hidden>
The -mwindows switch says that your are compiling a Windows GUI application, which implies WinMain() function. If you are not doing that, remove the switch and (maybe) use -mconsole instead. See http://gcc.gnu.org/onlinedocs/gcc/i386-and-x86_002d64-Windows-Options.html for explanations of the switches.

I think the issue can rather be concerned with the use of SDL.
As I mentioned above, when I link using
gcc -o slayer.exe file.o font.o image.o input.o slayer.o symbols.o video.o -mwindows -lmingw32 -lSDLmain -lSDL -lSDL_image -lSDL_ttf -lguile-2.0
the linkage succeeds.
Note that, although the -D option shouldn't have any influence on the linkage,
it does replace main with SDL_main during the compilation of object files,
and I think it's the SDL_main library that contains the actual entry point.

However, the question is not how to get the things built (because I already
managed to do so), but how to adjust the build system (i.e. configure.ac and/or
various Makefile.am files) so that it builds the things properly. In particular,
I didn't put the -mwindows there in the first place, so I have no option to remove
it or replace it.

regards,
M.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]