Well, hello after a long time. Blogging needs time and that is the thisng I do not seem to have much these days. 😦 I even can’t remember the last time i took a photo. really busy over making the unique file browser for Sahaj Linux.
As I am working in GTK+ 2 and the main lot of programmers (except me) sees Netbeans as their wordprocessor (!) … A friend and fellow programmer insistemd me to try Netbeans once. Thus I begun.
Well, if you don’t have the entire package of Netbeans, you will have to download the C/C++ Development Pack. After this, the netbeans will be able to detect and debug general C/C++ code. However, one have to configure Netbeans to include support for external libraries like GTK. Her’s how to do it:
Open a project in netbeans. right click onto it and get into Properties. In the Build menu (probably the 2nd menu in the tree), click “C compilers”.
Here you’ll see the option “Include Directories under “General” Tab. Click on browse (at left a small button) and include all the dependecy for gtk like cairo, gtk, glib, pango, atk, libpng, libjpg, etc.. detailed picture given below !
Now again We have to configure the Linker of Netbeans. We go to Linker > Libraries > Add Library. Here you’ll have to choose the libgtk xxxx.so file from “/usr/lib/” .. so go in the folder /usr/lib. Now select the File type to “.so” (dynamic library) from the default “.a” (static library). unless this you’ll not find libgtk.so ! Again the following picture explains all this!
Now you are done. Enjoy writing GTK code with Netbeans.
P.S: Though I was referred to write code on Netbeans, I am back to GEdit again! I’ll let you know How and Why in the next post where i’ll show you how to make GEdit a really cool code editor.