LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-29-2015, 01:42 PM   #1
Borneq
Member
 
Registered: Aug 2014
Posts: 36

Rep: Reputation: Disabled
How use glibconfig.h with CodeBlocks?


I try use Xft font library. Example
Code:
 XftFont *font = XftFontOpen (dpy, screen,
       , XftTypeString, "charter",
       , XftTypeDouble, 12.0,
       );
But must have Display *dpy,I found:
Code:
GtkXText *xtext = GTK_XTEXT (object);
    Display *dpy = GDK_WINDOW_XDISPLAY (xtext->draw_buf);
and included
Code:
#include <X11/Xft/Xft.h>
#include <gdk/gdkx.h>
I have added search include paths:
Code:
/usr/include/freetype2
/usr/include/gtk-3.0
/usr/include/glib-2.0
and intall sudo apt-get install libxft-dev
libfreetype6-dev already installed

Now compiler ask about glibconfig.h
Everywhere, for example http://question.ikende.com/question/...31383134323430
is
Code:
gcc `pkg-config --cflags glib-2.0` foo.c `pkg-config --libs glib-2.0`
But I am using gcc with CodeBlocks, not gcc from command line.
 
Old 11-29-2015, 07:08 PM   #2
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
The first answer here shows how to use pkg-config in codeblocks. Just substitute "glib-2.0" for "gtk+-3.0".
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Codeblocks problem brodo Slackware 11 10-11-2015 07:33 AM
[SOLVED] codeblocks-13.12 is not installing rahulvishwakarma Linux - Software 2 07-09-2014 06:34 AM
CodeBlocks problem r_jr Linux - Software 1 04-29-2012 02:46 AM
Error in CodeBlocks sujitkulkarni Programming 2 03-16-2011 05:55 PM
codeblocks elishac Linux - Newbie 9 03-25-2010 04:06 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:59 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration