Find the answer to your Linux question:
Results 1 to 2 of 2
I want to get into GTK+2.0 C++ programming so that I can make GUI's for random linux utillities (for the other newbs). However, whenever I try to compile my programs ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie
    Join Date
    Jun 2006
    Posts
    150

    g++ include paths


    I want to get into GTK+2.0 C++ programming so that I can make GUI's for random linux utillities (for the other newbs). However, whenever I try to compile my programs with the #include <gtk/gtk.h> or whatever it is, I get an include file not found error, which, obviously, is a problem for GTK programming. How do I add /usr/include/gtk to my default g++/gcc include search paths?

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    From the Gtk+ 2.0 Tutorial:

    Try using this:

    Code:
    g++ -Wall -g FILES -o helloworld `pkg-config --cflags gtk+-2.0` \
    `pkg-config --libs gtk+-2.0`

Posting Permissions

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