bug-gnubg
[Top][All Lists]
Advanced

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

RE: [Bug-gnubg] Re: Compile on Windows


From: Holger
Subject: RE: [Bug-gnubg] Re: Compile on Windows
Date: Sun, 10 Nov 2002 01:10:38 +0100

Hi Øystein,

Thanks for your help. Right now I'm at home and trying to compile under
Windows 95. Here I still only have the snapshot from 021030, so I don't
have bearoffgammon.* yet. For the rest it shouldn't make a difference, I
suppose.

Unfortunately, I have to say that it still doesn't work.

gcc -fnative-struct -O2 -Wall -DHAVE_CONFIG_H
-DLOCALEDIR=\"J:/glib/lib/locale\" \
 -I. -I./lib -Ij:/GNUbg/ext -Ij:/gcc/i386-mingw32msvc/include
-Ij:/glib/include \
 -Ij:/GTK+/include -Ij:/iconv -Ij:/intl/include -Ij:/gdbm/include
-Ij:/xml2/include/libxml2 \
 -c sound.c -o sound.o
sound.c:988: arguments given to macro `SoundWait'
make: *** [sound.o] Error 1

I had a look at the source, and it doesn't make sense to me. I hope that
you've got a clue.

Also I hope you don't mind my top-posting. I thought it might be easier to
read. Further down I've inserted some comments and answers to your reply.

Regards,

        Holger

At 21:27 08.11.02 +0100, Øystein Johansen wrote:
>>===== Original Message From Holger <address@hidden> =====
>>Hi,
>>
>>If I change gnubg.c and hard-code the locale directory at line 5704:
>>/*    bindtextdomain (PACKAGE, LOCALEDIR);  */
>>    bindtextdomain (PACKAGE, "/HB/gcc/lib/locale");
>
>Strange... that doesn't happend at my system, but it really shouldn't matter.

It's indeed very strange as the preprocessor just replaces the variable.
Anyone else has had this or knows what to do? It happens on both Win2000
and 95, so probably independent from Windows. gcc version is 2.95.2 msvcrt
build.

>>then it compiles well, except for some warnings that are not related to
this error.
>
>Never mind those warnings...
>
>>However, linking doesn't work (for me).
[snip]
>There's a new file in the source. bearoffgammon.c
>
>open the Makefile and add bearoffgammon.c under SRC. And add bearoffgammon.o 
>to OBJS.
[snip]
>While you're still in the Makefile add -liconv to LIBS.
>(or is it called -liconv.dll ?)
[snip]
>I think you miss record.o and record.c in your Makefile as well. (Maybe I 
>should update the Makefile at my site...?! )

Yes, this would be a good idea. :-)

>>C:\HB\gcc\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..\..\libxml2.a(na
noftp.
>>o)(.text+0xa94):nanoftp.c: undefined reference to address@hidden'
>>[snipped]
>>C:\HB\gcc\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..\..\libxml2.a(na
nohttp
>>.o)(.text+0x1367):nanohttp.c: undefined reference to address@hidden'
>>C:\HB\gcc\bin\..\lib\gcc-lib\i386-mingw32msvc\2.95.2\..\..\..\libxml2.a(na
nohttp
>>.o)(.text+0x1425):nanohttp.c: undefined reference to address@hidden'

>This looks a bit spooky. I can't explain why this happens at your system.
I'm 
>not sure which library you're missing either. 
>A shot in the dark: Try to add -lwinsock32 to LIBS in the Makefile

More on this when I get to linking again.

>>I wrote:
>>> Hi all,
>>>
>>> Could you help me compile on Windows (2000 and at home 95), please?
>>>
>>> It fails with :
>>> gnubg.c: In function `real_main':
>>> gnubg.c:5704: parse error before `/'
>
>This was fixed by the hardcoding....?

Yes. In both gnubg.c and makeweights.c I've replaced the line
    bindtextdomain (PACKAGE, LOCALEDIR);
with
    bindtextdomain (PACKAGE, "J:/glib/lib/locale");

[snip]
>>> getopt.c: In function `_getopt_internal':
>>> getopt.c:647: warning: implicit declaration of function `strncmp'
>>> getopt.c:692: warning: suggest explicit braces to avoid ambiguous `else'

The last one is trivial to resolve.

[snip]
>>> libw11-2001-12-01-bin.zip
>>> libw11-2001-12-01-lib.zip
>
>What's libw11 ?? I don't think I use that?

It's the X11 headers for Windows. I had seen a dependency earlier but know
now that it's not needed since you're using GTK.

>>> libxml2-2.4.12-1-lib.zip
>>> libxml2-2.4.12-bin.zip
>
>I think I use a different version of libxml2, not sure which but I think the 
>strange linking problem comes from this library.
>
>>>
>>> I also fetched Makefile, lib/Makefile and config.gui from Oysteins site,
>>> added includes in Makefile:
>>> INCLUDE = -I. -I./lib -IC:/HB/gcc/include/glib-2.0
>>> -IC:/HB/gcc/lib/glib-2.0/include \
>>> -IC:/HB/gcc/lib/gtk+/include
>
>Fine
>
>>> I've changed the dir for the locale to:
>>> DEFS    = -DHAVE_CONFIG_H -DLOCALEDIR=\"/HB/gcc/lib/locale\"
>
>This was hardcoded later (?)

Yes, see above.

>>> What else is missing?
>
>That should be it I guess. You you have some guts you could of course also
try 
>to compile with gtk-2.0. I've done it and it looks a bit cooler.

Sure, I'll give it a try. But first I'd like to make it work the
conservative way.

>>> TIA,
>>>
>>> Holger
>
>Good luck,
>-Øystein





reply via email to

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