bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Problems using gettext on Windows


From: Joerg Henrichs
Subject: Re: Problems using gettext on Windows
Date: Wed, 09 Mar 2011 16:55:03 +1100
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Lightning/1.0b2 Thunderbird/3.1.7

Hi Bruno,

thanks a lot for your very quick answer!
...
So it appears like the problem you are seeing is with different copies of
the C library.
OK, so I'll try to reproduce the problem with a simple "Hello World"
program (with the idea that I then add the dependencies one at a time
and see when it stops working).

Cygwin is not really an option for us as we have many people who use VS to test our SVN versions, who don't have cygwin installed.

PS: Not sure if this is related: I have also problems using fprintf with
gettext - it just crashes with
   Access violation writing location 0x00000010.
the first time a fprintf is done. I worked around this by adding a
#undef fprintf
after including libintl.h (which re-defines fprintf). Perhaps this might
be somehow related to the above issue?

Indeed, this too is an indication that you are using different C library
versions at the same time.
I can easily reproduce this issue with a simple test case:

#include <stdio.h>
#include <libintl.h>
//#undef fprintf

int main(int argc, char* argv[])
{
    fprintf(stderr, "Hello world stderr\n");
    fprintf(stdout, "Hello world stdout\n");
        return 0;
}

I only copied libintl.h, and intl.lib, and iconv.dll and intl.dll from
the gettext/libiconv packages, nothing else (for a normal console application). Compiled as 'release' (i.e. /MD - multithreaded DLL) - and it immediately crashes in the first fprintf statement. All other setting were unchanged from the default (except using precompiled headers). Am I missing something obvious?

Cheers,
   Joerg



reply via email to

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