Howto access .RC/.RES Ressource files with portable C++ code ( BCC,MSVC,GNU-C++,OpenWatcom)?

Discussion in 'C++' started by Rolf Hemmerling, Oct 31, 2003.

  1. Hello !

    Beginner's question:

    Howto access .RC/.RES Ressource files with portable C++ code (
    BCC,MSVC,GNU-C++, OpenWatcom) ?

    I just wanna access "local language strings", so that I may replace the
    ..RC file to compile a version of my software for a different language.

    Of course it is o.k. to use preprocessor commands !
    Any free demo script available ?

    I am using

    free Borland C++ 5.5 - no ressource editor
    MS Visual Studio .NET 2003 - built-in ressource editor
    free OpenWatcom 11.c ( shipped with a ressource editior )
    free Dev-C++ & MingW = GNU-C for Windows - no ressource editor

    WeditRes
    http://www.objectcentral.com/vide.htm
    http://www.cs.virginia.edu/~lcc-win32/

    Gnu-C++ with Linux

    Do you know any other FREE ressource editors for Windows ?

    Is it possible to write a common ressource file for Borland / Microsoft
    / OpenWatcom, and if so with which (free) ressource editor ? If so if I
    just wanna access text strings ?

    And how to get compatibility between the Windows compilers (
    BCC/MSVC/Watcom/GNU C++) and Linux ( just GNU C++), with ressources ?

    As I am a beginner, how and with what should I start ?

    As Linux support ist just "second choice" a solution "portable for any
    Windows compiler" is acceptable ( but a drawback, of course).

    Sincerely
    Rolf
    --
    / / / Alone on the data highway...
    / / like on an allee in Hannover-Herrenhausen
    / / / The Hemmerling (R) WEB site - Rolf Hemmerling,Germany
    / / / http://www.hemmerling.com/
    Rolf Hemmerling, Oct 31, 2003
    #1
    1. Advertising

  2. Addition: gettext

    I just learned that there is
    gettext
    http://www.gnu.org/software/gettext/gettext.html
    , which is supported natively by

    wxWindows
    http://www.wxwindows.org/manuals/2.4.2/wx460.htm
    ,

    if I just wanna have local strings.

    Do you like it, is it usual to use it ?

    But of course, as I wanna support MFC / .NET frameworks, its o.k. to
    look for a common way for accessing ressources with C++ on Windows platform.

    As the mandatory GUI platform ist "QT"
    http://www.trolltech.com/
    , any suggestions ?

    So internationalisation with gettext, but another .RC/.RES file for
    MFC/.NET GUI, but no .RC/.RES file for all other GUI framworks ?

    Sincerely
    Rolf
    --
    / / / Alone on the data highway...
    / / like on an allee in Hannover-Herrenhausen
    / / / The Hemmerling (R) WEB site - Rolf Hemmerling,Germany
    / / / http://www.hemmerling.com/
    Rolf Hemmerling, Oct 31, 2003
    #2
    1. Advertising

  3. Rolf Hemmerling

    Rolf Magnus Guest

    Re: Addition: gettext

    Rolf Hemmerling wrote:

    > I just learned that there is
    > gettext
    > http://www.gnu.org/software/gettext/gettext.html
    > , which is supported natively by
    >
    > wxWindows
    > http://www.wxwindows.org/manuals/2.4.2/wx460.htm
    > ,
    >
    > if I just wanna have local strings.
    >
    > Do you like it, is it usual to use it ?
    >
    > But of course, as I wanna support MFC / .NET frameworks, its o.k. to
    > look for a common way for accessing ressources with C++ on Windows
    > platform.
    >
    > As the mandatory GUI platform ist "QT"
    > http://www.trolltech.com/
    > , any suggestions ?


    Qt has its own support for i18n. I suggest you use this.
    See http://doc.trolltech.com/3.2/i18n.html
    Rolf Magnus, Oct 31, 2003
    #3
  4. Rolf Hemmerling

    Roger Leigh Guest

    Re: Addition: gettext

    Rolf Hemmerling <> writes:

    > I just learned that there is
    > gettext [...]
    > if I just wanna have local strings.
    >
    > Do you like it, is it usual to use it ?


    Yes. gettext (libintl) is the de-facto i18n/l10n framework in the
    free software world. It's very good, and it's easy to maintain
    translatable strings and translations. There are several tools
    available for translation work, and end-users can create/edit
    translations without any messing with resource files.

    One of the best features of gettext is the merging of new and changed
    strings with existing translations. Tools such as Emacs po-mode allow
    very easy updating of translations.

    > But of course, as I wanna support MFC / .NET frameworks, its o.k. to
    > look for a common way for accessing ressources with C++ on Windows
    > platform.


    I don't know how resource files work, so I can't help here. It might
    be possible to construct the resource file from the strings extracted
    with xgettext. That's a question for a MS group.

    > As the mandatory GUI platform ist "QT"
    > http://www.trolltech.com/
    > , any suggestions ?


    There's also Gtkmm, which is well worth investigating. It uses
    gettext for i18n. It integrates well with the Standard Library.


    --
    Roger Leigh

    Printing on GNU/Linux? http://gimp-print.sourceforge.net/
    GPG Public Key: 0x25BFB848. Please sign and encrypt your mail.
    Roger Leigh, Oct 31, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Progman
    Replies:
    0
    Views:
    326
    Progman
    Mar 6, 2006
  2. azemerov

    GNU C vs BCC - huge output file

    azemerov, Dec 1, 2005, in forum: C++
    Replies:
    2
    Views:
    555
    Neil Cerutti
    Dec 1, 2005
  3. rfasuma
    Replies:
    1
    Views:
    509
    Lionel B
    Feb 25, 2008
  4. Leiradella, Andre V Matos Da Cunha

    RES: RES: Bare-bones Ruby

    Leiradella, Andre V Matos Da Cunha, Dec 29, 2004, in forum: Ruby
    Replies:
    1
    Views:
    299
    Stefan Schmiedl
    Dec 29, 2004
  5. Leiradella, Andre V Matos Da Cunha

    RES: RES: RES: Bare-bones Ruby

    Leiradella, Andre V Matos Da Cunha, Dec 29, 2004, in forum: Ruby
    Replies:
    0
    Views:
    133
    Leiradella, Andre V Matos Da Cunha
    Dec 29, 2004
Loading...

Share This Page