[SDL] SDL + ncurses == error!
Leo M. Cabrera
leo28c at gmail.com
Sun Aug 12 10:46:53 PDT 2007
Well, why'd I want both if SDL redirects stdout and stderr to text
files? :-/
I didn't need SDL_net after all, I could just use Winsock... :-P
William McBrine wrote:
> L-28C <kixdemp <at> gmail.com> writes:
>
>
>> But wait, there's a version of PDCurses that runs on SDL, so I compiled
>> that version and tried to use it. However, on compiling my (yet
>> hello-world-kinda) program, I get this:
>>
>> ---------------------------
>> C:\Projects\C\TextCS>make
>> gcc -o ./bin/Test.exe ./obj/main.o ./obj/network.o ./obj/console.o
>> -lpdcurses
>> -lmingw32 -lSDLmain -lSDL -lSDL_net
>> ./obj/console.o: In function
>> `InitConsole':C:/Projects/C/TextCS/./src/console.c:
>> 9: undefined reference to `_imp__stdscr'
>> collect2: ld returned 1 exit status
>> make: *** [TextCS.exe] Error 1
>> ---------------------------
>>
>> Smells like the order of the libraries when linking is wrong... But I've
>> tried almost every way possible, and it only gets worse, with a bunch of
>> SDL undefined references.
>>
>
> I don't think that library order is your problem. Did you build PDCurses as a
> DLL? If so, you need to specify -DPDC_DLL_BUILD when compiling each module that
> includes curses.h. (Or you could do it the way the curses.h distributed with the
> precompiled DLLs does, with "#define PDC_DLL_BUILD" at the top.)
>
> BTW, I'd also add "-mwindows" to the build options so that the finished
> executable doesn't open a console window along with the SDL window. Unless you
> _want_ both...
>
>
> _______________________________________________
> SDL mailing list
> SDL at lists.libsdl.org
> http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org
>
>
More information about the SDL
mailing list