User forums > Using Code::Blocks
-fontconfig ????
Papito:
I have an application that used to compile perfectly when I ported from the old c::b version to the new version, but when I decided to recreate the entire project using the new version of C::B I get an linking error that reads:
cannot find -lfontconfig
What is so strange is that I am not using -lfontconfig, below are the parameters that I am using to compile this gtkmm program:
CFLAGS
~~~~~~
-mms-bitfields -ID:/XWin/include/gtkmm-2.4 -ID:/XWin/lib/gtkmm-2.4/include -ID:/XWin/include/glibmm-2.4 -ID:/XWin/lib/glibmm-2.4/include -ID:/XWin/include/giomm-2.4 -ID:/XWin/lib/giomm-2.4/include -ID:/XWin/include/gdkmm-2.4 -ID:/XWin/lib/gdkmm-2.4/include -ID:/XWin/include/pangomm-1.4 -ID:/XWin/include/atkmm-1.6 -ID:/XWin/include/gtk-2.0 -ID:/XWin/include/sigc++-2.0 -ID:/XWin/lib/sigc++-2.0/include -ID:/XWin/include/glib-2.0 -ID:/XWin/lib/glib-2.0/include -ID:/XWin/lib/gtk-2.0/include -ID:/XWin/include/cairomm-1.0 -ID:/XWin/include/pango-1.0 -ID:/XWin/include/cairo -ID:/XWin/include/libpng12 -ID:/XWin/include/atk-1.0
LIBS
~~~~
-LD:/XWin/lib -lgtkmm-2.4 -lgiomm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lgtk-win32-2.0 -lpangomm-1.4 -lcairomm-1.0 -lglibmm-2.4 -lsigc-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl
Can anyone explain to me why this is happening, is this a virus or is it a bug in C::B?
TIA
stahta01:
1. Turn on full compiler logging to verify the problem.
http://wiki.codeblocks.org/index.php?title=FAQ#Q:_How_do_I_troubleshoot_an_compiler_problem.3F
2. After problem is confirmed, I would use an Text Editor to edit the cbp file to find the problem and fix it. Note, if you do not know the difference between Word Processor and Text Editor do not do this step.
Tim S
MortenMacFly:
--- Quote from: Papito on November 25, 2008, 04:48:00 am ---Can anyone explain to me why this is happening, is this a virus or is it a bug in C::B?
--- End quote ---
Most likely a virus... Harharhar... :lol:
Honestly:
Check the following build options in your project file:
1.) Project level: Tab "Linker settings" -> "Link libraries", "Other linker options"
2.) Target level: Tab "Linker settings" -> "Link libraries", "Other linker options"
3.) Project level: Tab "Compiler settings" -> "Other options"
4.) Target level: Tab "Compiler settings" -> "Other options"
"fontconfig" will be in one of these settings.
MortenMacFly:
--- Quote from: stahta01 on November 25, 2008, 05:37:35 am ---2. After problem is confirmed, I would use an Text Editor to edit the cbp file to find the problem and fix it.
--- End quote ---
You better don't. This will be the root of even more trouble. There are NO settings hidden in the project file. All settings from the project file can be edited via C:B.
Papito:
Ok, there seems to be a lot of problems for me to follow your suggestions, so, what I will do is explain to you what I am doing at my end as detailed as possible, in the hope that from there you will be able to see what I am doing wrong.
First I will recreate the project
Start Code::Blocks
Click on "Create a new project"
Select "console application"
Select "c++"
name the application "tst"
Select "Create debug configuration"
<bin\Debug>
<obj\Debug>
Select "Create release configuration"
<bin\Release>
<obj\Release>
Click on "Finish"
I then add all the needed files in the project and marked them as debug as the target they should all belong to.
Second I will extract the pkg-config parameters
Using the Prompt, I type:
$> pkg-config gtkmm-2.4 --cflags > cflag_parameters.txt
$> pkg-config gtkmm-2.4 --libs > libs_parameters.txt
The values, or parameters, in the two above text files are:
CFLAGS
~~~~~~
-mms-bitfields -ID:/XWin/include/gtkmm-2.4 -ID:/XWin/lib/gtkmm-2.4/include -ID:/XWin/include/glibmm-2.4 -ID:/XWin/lib/glibmm-2.4/include -ID:/XWin/include/giomm-2.4 -ID:/XWin/lib/giomm-2.4/include -ID:/XWin/include/gdkmm-2.4 -ID:/XWin/lib/gdkmm-2.4/include -ID:/XWin/include/pangomm-1.4 -ID:/XWin/include/atkmm-1.6 -ID:/XWin/include/gtk-2.0 -ID:/XWin/include/sigc++-2.0 -ID:/XWin/lib/sigc++-2.0/include -ID:/XWin/include/glib-2.0 -ID:/XWin/lib/glib-2.0/include -ID:/XWin/lib/gtk-2.0/include -ID:/XWin/include/cairomm-1.0 -ID:/XWin/include/pango-1.0 -ID:/XWin/include/cairo -ID:/XWin/include/libpng12 -ID:/XWin/include/atk-1.0
LIBS
~~~~
-LD:/XWin/lib -lgtkmm-2.4 -lgiomm-2.4 -lgdkmm-2.4 -latkmm-1.6 -lgtk-win32-2.0 -lpangomm-1.4 -lcairomm-1.0 -lglibmm-2.4 -lsigc-2.0 -lgdk-win32-2.0 -latk-1.0 -lgio-2.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl
I am not sure if what I am doing is right, but I would really appreciate some help.
Please note that there is no '-lfontconfig'
third add the parameters to c::b
I then copy the content in the cflags_parameters.txt to Code::Blocks, as follows:
Project->Building Options->Compiler Settings->'Other Options' tab
And the content of the libs_paramenters.txt as follows
Project->Building Options->Linker Settings->'Other Linker Options' box
--------------------
What is wrong in what I'm doing? why the -lfontconfig linking error?
TIA
Navigation
[0] Message Index
[#] Next page
Go to full version