Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm currently writing a program that uses the GTK library.

The programs compile and run fine.

The problem is - geany seems to not 'know' what structs and methods are in the GTK header file.

It won't highlight structs, and doesn't offer to autocomplete functions.

I've done some experimenting - if I'm #including my own header files - it will only do the autocomplete if that file is open in geany. Though it is ok for other std header files, like stdlib.h and math.h

What do I do to fix this?

share|improve this question

i've encountered this same problem today..

geany must know where to look to get a valid list of symbols and so it read the sources of all the opened files, so if you want a useful symbol list you should open all the header files you need before start programming..

even if geany want to look automagically in the header files you include it will not be able to guess which gtk version you want use for your project (gtk2, gtk3, ...)..

remember that geany is lightweigth :-)

but here is my workaround.. (i guess you are on linux and you have a shell, gcc, etc)

to get the job done i did this :

echo "#include <gtk/gtk.h>" > gtk_headers.c
gcc -E gtk_headers.c `pkg-config gtk+-3.0 --cflags --libs` -o gtk_headers.h

(i'm working with gtk version 3, adjust the pkg-config line to meet your needs)

then i open my project files and gtk_headers.h, this way geany can rip the headers of the gtk library i'm working on..

pro : simple

cons : the headers i open in geany is ~1.6 MB O_o

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .