Complete.Org: Mailing Lists: Archives: freeciv-dev: May 2003:
[Freeciv-Dev] Re: (PR#4231) mingw32 & sdl client
Home

[Freeciv-Dev] Re: (PR#4231) mingw32 & sdl client

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bursig@xxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4231) mingw32 & sdl client
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Thu, 29 May 2003 01:35:48 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Thu, 15 May 2003, Rafa³ Bursig wrote:
> > gui_main.c: In function `gui_main_loop':
> > gui_main.c:158: storage size of `tv' isn't known
> > gui_main.c:159: `fd_set' undeclared (first use in this function)
> > gui_main.c:159: (Each undeclared identifier is reported only once
> > gui_main.c:159: for each function it appears in.)
> > gui_main.c:159: parse error before "civfdset"
> > gui_main.c:177: warning: implicit declaration of function `FD_ZERO'
> > gui_main.c:177: `civfdset' undeclared (first use in this function)
> > gui_main.c:178: warning: implicit declaration of function `FD_SET'
> > gui_main.c:182: warning: implicit declaration of function `select'
> > gui_main.c:190: warning: implicit declaration of function `FD_ISSET'
> > gui_main.c:158: warning: unused variable `tv'
> > make[4]: *** [gui_main.o] Error 1
> >
> Per. this is problem of headers.
> Those functions and macros are normal used in gui-win32.
> IMHO it requ. additionaly headers but I don't know which.
> Try add somthing like this at front of gui-sdl/gui_main.c
> #ifdef WIN32_NATIVE
> #include <winsock.h>

This works.

Now I get this instead:

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I./.. -I./../include
-I../../common -I../../common/aicore -I../../intl -I./../agents
-I/usr/local/include/SDL -Dmain=SDL_main -I/d/Program\
Files/GnuWin32/include -I/d/Program\ Files/GnuWin32/include/freetype2
-g -O2 -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes
-Wmissing-declarations -c `test -f 'gui_main.c' || echo './'`gui_main.c
In file included from gui_main.c:57:
gui_stuff.h:62: parse error before numeric constant
In file included from gui_main.c:58:
gui_id.h:26: parse error before numeric constant
make[2]: *** [gui_main.o] Error 1

Your enums WS_* and ERROR conflict with Windows stuff, and must be
renamed. Once I did this, using some sed and bash magic, I got further.
(ERROR isn't even used anywhere as far as I could see.)

gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I./.. -I./../include
-I../../common -I../../common/aicore -I../../intl -I./../agents
-I/usr/local/include/SDL -Dmain=SDL_main -I/d/Program\
Files/GnuWin32/include -I/d/Program\ Files/GnuWin32/include/freetype2
-g -O2 -Wall -Wpointer-arith -Wcast-align -Wmissing-prototypes
-Wmissing-declarations -c `test -f 'gui_iconv.c' || echo './'`gui_iconv.c
gui_iconv.c: In function `convert_to_utf16':
gui_iconv.c:120: warning: passing arg 2 of `libiconv' from incompatible
pointer type
gui_iconv.c: In function `convertcopy_to_utf16':
gui_iconv.c:197: warning: passing arg 2 of `libiconv' from incompatible
pointer type
gui_iconv.c: In function `convert_to_chars':
gui_iconv.c:277: warning: passing arg 2 of `libiconv' from incompatible
pointer type

Then it compiles successfully.

I had to rename libjpeg.dll to jpeg-62.dll for some really odd reason I
can't figure out.

Then it says this when I try to run it:

$ client/civclient.exe
2: Using Video Output: windib
0: Couldn't find stdfont.ttf file. Please link/copy/move anyunicode ttf
font to data dir as stdfont.ttf

Why isn't a ttf font shipped with freeciv? There are free ones available
nowadays. Adding a ttf font, I get this:

$ client/civclient.exe
2: Using Video Output: windib
...
0: Your current tileset don't contains GUI theme graphic
Please use other tileset with GUI graphic pack (use -t tileset options)
If you don't have any tileset with SDLClient GUI theme then go to freeciv
(ftp.freeciv.org/pub/freeciv/incoming) ftp side and download DELUXE
tileset theme

Hmmm... This is not good. All clients should work with all tilesets. What
are your plans for solving this problem? Ok, I download the deluxe
tileset. Now it starts.

1: warning: already have a sprite for cd.occupied
1: warning: already have a sprite for city.european_occupied
1: warning: already have a sprite for city.classical_occupied
1: warning: already have a sprite for city.industrial_occupied
1: warning: already have a sprite for city.modern_occupied
1: warning: already have a sprite for city.postmodern_occupied
1: warning: already have a sprite for cd.occupied

The chat window leaves streaks behind when I move it. The nation dialog
pops up underneath the chat window and becomes blended, but I can still
use it. The mapview also becomes blended. I can move a unit around, but it
quickly crashes.

Trying to rerun with gdb, it crashes on trying to open join server dialog:
Program received signal SIGSEGV, Segmentation fault.
0x00428ab5 in popup_join_game_callback (pWidget=0x1f524a0) at
connectdlg.c:526
526       area->x = (pUser->dst->w - 400)/ 2;

I can't get past this point with gdb. Without gdb I can successfully get
into the game, but it crashes once I try to select a unit or do much of
anything. Can't be more helpful without gdb. As long as I don't try to
touch the chat window, the all-other-windows-become-blended problem
described above does not happen, though.

I hope this is helpful.

  - Per




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