Thread: Does C++ Have a GUI Library Like Java?

  1. #1
    C++ Newbie
    Join Date
    Aug 2005
    Posts
    55

    Question Does C++ Have a GUI Library Like Java?

    Does it? And if it doesn't have one built-in, can one be added?

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    No, and yes.
    My best code is written with the delete key.

  3. #3
    C++ Newbie
    Join Date
    Aug 2005
    Posts
    55
    Where can I get one? And do you have to learn DirectX or some sort of graphics to do it?

  4. #4
    Registered User
    Join Date
    Sep 2001
    Posts
    4,912
    That's one option. If you want to do custom graphics, there's OpenGL, DirectX, Allegro, SDL, etc...

    If you want to do Windows programming, there's the Win32 SDK, and several wrappers like MFC, OWL, etc...

    Do a bit of research and then choose which one suits your needs better. The libraries are more often than not free, and available for download. You can certainly find a tutorial that teaches you how to use the library from Google.

  5. #5
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    There's also Qt, gtk, WxWidgets, fltk, etc which are all cross-platform GUI (not graphics) libraries.

    Cheers
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  6. #6
    C++ Newbie
    Join Date
    Aug 2005
    Posts
    55
    Well, I downloaded and installed WxWidgets, but I've never used libraries before. How do I use it? What should I do now?

  7. #7
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Well, reading the documentation and working with the sample programs is a start. As far as making sure the library is linked to your program, that depends on what compiler you are using.

    I say this one more time: jumping into GUI programming (or graphics, or any other specialization) without a good grasp of the language is very likely to lead to low productivity, wasted effort, and frustration.

    Cheers
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  8. #8
    C++ Newbie
    Join Date
    Aug 2005
    Posts
    55
    Quote Originally Posted by Zach L.
    I say this one more time: jumping into GUI programming (or graphics, or any other specialization) without a good grasp of the language is very likely to lead to low productivity, wasted effort, and frustration.

    Cheers
    I know, i'm not doing just yet. I just want to know if it's all set up for when I do use it.

  9. #9
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Well:

    1) You need to make sure all the headers are in the appropriate directory (essentially wherever), and that the compiler's search path includes that directory.
    2) You need to make sure that the libraries are in the proper directory (again, essentially wherever), and that the linker know where to look for them.

    Generally, in the new directories ought to be in something like a subdirectory of the compilers pre-existing header/lib directories or a sudirectory you specifically set aside for 3rd party libraries (this is a good option if you'll be working with multiple compilers).

    How you set this depends on what compiler/IDE you have (that is, let us know what you have, and someone will probably be able to help you).
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Java for real-time applications
    By zacs7 in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 08-26-2008, 06:34 AM
  2. Suggestion for a GUI library?
    By Devil Panther in forum Windows Programming
    Replies: 5
    Last Post: 12-20-2006, 06:53 AM
  3. Requesting Java Chat Client Maintenence
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 04-02-2003, 01:57 PM
  4. How to use Java with C++
    By Arrow Mk 84 in forum C++ Programming
    Replies: 2
    Last Post: 02-27-2003, 04:12 PM
  5. Visual J#
    By mfc2themax in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 10-08-2001, 02:41 PM