Is it possible to use GNU gettext with MS Visual C++? Does someone know where to find a sample project that compiles under Visual C++?
Update: Thanks to Sorin Sbarnea for his comments which help me to put all the pieces together:
I'm used to the Delphi version of gettext where you simply compile the unit gnugettext.pas with your project, that is why I was simply trying to compile gettext.h with my MSVC project. It might work for other C++ compilers but not with MSVC.
The FAQ of GNU gettext explains how to do it with MSVC by using precompiled DLLs. But there are no links to the DLLs and these DLLs aren't in the main download. They must be downloaded separatly from the ftp site. You will need 2 files for the dlls:
And if you need tools to extract the strings from the exe, you also need:
I haven't tried it yet with MSVC, but now I think it will works.
Clearly I know lots of project that are using gettext in MSVC. Also if you are considering using GNU gettext runtime in a commercial, closed-source, project be aware that the runtime library is LGPL. This means mainly that you need to open source any modification you may do to the gettext runtime library (not your code).
Also, gettext utilities are using GPL license - but this is not so important because you don't need/want to distribute them.
For Win32 you should get the gettext runtime from Gnome FTP because the build is newer than the one from GNU.
Regarding open-source software take a look at PoEdit.
GNU gettext-0.18.3.2 Visual C++(MSVC) runtime download, it works well for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With