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?
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:
On many systems the Fontconfig warning gripes about a file named 50-user.conf file, located in /etc/fonts/conf.d.
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.
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:
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With