Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

fontconfig/fontconfig.h not found in Codeblocks

I am trying to build Cocos2d-x project in Codeblocks IDE in Ubuntu 14. I got fontconfig/fontconfig.h not found error during compiling. I'm stuck here. How can I solve this?

like image 201
charlotte Avatar asked Jun 19 '15 06:06

charlotte


People also ask

Where is the fontconfig file located?

On many systems the Fontconfig warning gripes about a file named 50-user.conf file, located in /etc/fonts/conf.d . So, if you continue to see the Fontconfig warning -- even after creating the new ~/.config folders -- you probably need to comment two lines that reference the old deprecated location:

What does the fontconfig warning mean?

On many systems the Fontconfig warning gripes about a file named 50-user.conf file, located in /etc/fonts/conf.d.

Is libfontconfig1-dev actually installed?

libfontconfig1-dev was actually listed as installed. After looking at other sites, I however re-ran sudo apt-get install libfontconfig-dev to be sure, it told me it would actually install libfontconfig1-dev, so I confirmed. Then I unset PKG_CONFIG_PATH to be sure to test in the original configuration, and ran ./configure : it worked.

How to move fontconfig configuration file to another directory?

Older versions of Fontconfig expected the configuration file ( .fonts.conf) to be in the user's home directory. Now, Fontconfig expects this file -- renamed fonts.conf -- in the ~/.config/fontconfig directory. So run these commands to create the folder, as well as move ( and rename) the conf file to the new, proper, location:


1 Answers

The problem is that you are missing the package libfontconfig1-dev. From the command line run the following command:

sudo apt-get install libfontconfig1-dev

Or else use Software Centre and search for the package, if you prefer the graphical approach.

like image 57
Ken Y-N Avatar answered Oct 12 '22 13:10

Ken Y-N