Re: What am I doing wrong?



José Alburquerque wrote:
Jam said the following:
This is not the first time I am posting this question, and I am beginning to wonder if what I am facing is a bug or if it is indeed a mistake at my end. Let me explain to you what I do when trying to compile; so that you might be able to spot what I am doing wrong.
I am using
gtkmm-win32-devel-2.14.1-3.exe <http://ftp.gnome.org/pub/GNOME/binaries/win32/gtkmm/2.14/gtkmm-win32-devel-2.14.1-3.exe> under Windows XP and using Code::Blocks 8.2 as my IDE, GCC compiler, MSYS-1.0.11-2004.04.30-1 and MinGW-5.1.3

Using the Prompt, I type:
$> pkg-config gtkmm-2.4 --cflags > cflag_parameters.txt
$> pkg-config gtkmm-2.4 --libs > libs_parameters.txt

I then open the cflags_parameters.txt and libs_parameters.txt files and start Code::Blocks IDE. 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

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.


Thanks folks

I have to say, codeblocks is really a nice GUI (I just ran it to have a look at it). The reason it's so hard to help you is because most people like to see the command that was run to compile and the output of the build. If you could post these on the list others will be able to give you more help. Here's an example:

g++ -DHAVE_CONFIG_H -I. -I../.. -I../../gstreamer -I../../gstreamerbase -pthread -I/opt/usr-jhbuild/include/glibmm-2.4 -I/opt/usr-jhbuild/lib64/glibmm-2.4/include -I/opt/usr-jhbuild/include/sigc++-2.0 -I/opt/usr-jhbuild/lib64/sigc++-2.0/include -I/opt/usr-jhbuild/include/glib-2.0 -I/opt/usr-jhbuild/lib64/glib-2.0/include -I/opt/usr-jhbuild/include/gstreamer-0.10 -I/opt/usr-jhbuild/include/libxml2 -I/opt/usr-jhbuild/include/libxml++-2.6 -I/opt/usr-jhbuild/lib64/libxml++-2.6/include -pthread -I/opt/usr-jhbuild/include/glibmm-2.4 -I/opt/usr-jhbuild/lib64/glibmm-2.4/include -I/opt/usr-jhbuild/include/sigc++-2.0 -I/opt/usr-jhbuild/lib64/sigc++-2.0/include -I/opt/usr-jhbuild/include/glib-2.0 -I/opt/usr-jhbuild/lib64/glib-2.0/include -I/opt/usr-jhbuild/include/gstreamer-0.10 -I/opt/usr-jhbuild/include/libxml2 -I/opt/usr-jhbuild/include/libxml++-2.6 -I/opt/usr-jhbuild/lib64/libxml++-2.6/include -g -O2 -MT generate_plugin_hg_file.o -MD -MP -MF .deps/generate_plugin_hg_file.Tpo -c -o generate_plugin_hg_file.o generate_plugin_hg_file.cc
generate_plugin_hg_file.cc: In function ‘int main(int, char**)’:
generate_plugin_hg_file.cc:104: error: expected `;' before ‘}’ token

As you can see, the g++ command (very long) appears and the last two lines show the error. People can use the output to give you better answers.

I would suggest that you also give the NetBeans IDE a try because you can get this information very easily there also. If all else fails, you could use the command line and then post the command you use in the command line and the output (if you get errors).

--
Happiness has many doors, and when one of them closes another opens, yet we spent so much time looking at the one that is shut that we don't see the one that just opened..
------------------------------------------------------------------------

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Yes, sorry :(
I forgot to add the error, which by the way is a linking error, not a compiling error.
Here is the error message

-------------- Build: default in Console application ---------------

Linking executable: TheApplication.exe
D:\XWin\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lfontconfig
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings

--------------- End of file ----------------------------------------

Thanks folks for all the help

--
Know this... God will move heavens and earth to do what you cannot do and that He will not for something you can.

Happiness has many doors, and when one of them closes another opens, yet we spent so much time looking at the one that is shut that we don't see the one that just opened..



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]