Results 1 to 5 of 5

Thread: Gtkmm question

  1. #1
    Join Date
    Jun 2006
    Location
    a polluted desert
    Beans
    101
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Gtkmm question

    For some reason, I am not able to use normal C datatypes in Gtkmm. For example, char* has to be ustring and short has to be guint16. Which header must I include to in order to use ustring, guint16, and the like?

  2. #2
    Join Date
    Mar 2006
    Location
    Philadelphia, PA
    Beans
    472

    Re: Gtkmm question

    You cant I dont believe. The C datatypes are only for regular GTK, GTKMM uses different ones and the C ones are not compatible with C++.

  3. #3
    Join Date
    Jun 2006
    Location
    a polluted desert
    Beans
    101
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Gtkmm question

    You sure about that? I've always been able to use int, unsigned int, unsigned char, etc in C++. I'm talking about the API specific datatypes of gtkmm.

    Should I just include glib.h?

  4. #4
    Join Date
    Mar 2006
    Location
    Philadelphia, PA
    Beans
    472

    Re: Gtkmm question

    Well not the standard data types, but the custom ones created by the GTK library. like gint for C and stuff. Those dont work in C++ as far as I know. Try glib.h I suppose. Never tried using glib.h but worth a try.

  5. #5
    Join Date
    Jun 2006
    Location
    a polluted desert
    Beans
    101
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: Gtkmm question

    I included "glibmm.h" instead and everything worked fine.

    However, I have one more question.

    How do I assign a formatted string to a glib::ustring object? I've tried assigning a formatted string of formatted gchars to a glib::ustring, but that doesn't seem to work.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •