Re: Undefined



Pedro,

The answer is is the man page for g++.
Extract:
  -l library
      [..]
      It makes a difference where in the command you write this option;
      the linker searches and processes libraries and object files in the
      order they are specified.  Thus, foo.o -lz bar.o searches library z
      after file foo.o but before bar.o. If bar.o refers to functions in z,
      those functions may not be loaded.

Precision: the position of argument '-LC:/libs/gtkmm/lib' was not the problem.
The problem was with the positions of the '-l<library>' arguments.

Happy coding! ;-)
Sylvain.

-- 
Sylvain Vedrenne
http://sylvain.vedrenne.free.fr

----- Pedro Leite Rocha <pedro leite rocha gmail com> a écrit :
> Hi, Sylvain.
> 
> Yes, it worked! Thanks so much!
> But I don't get it... Why?
> 
> 2009/5/19 Sylvain Vedrenne <sylvain vedrenne free fr>:
> > Pedro,
> >
> > In the link command, put
> >    -o gtk_test.exe src\gtk_test.o
> > at the beginning, like this:
> >
> > g++ -o gtk_test.exe src\gtk_test.o -LC:/libs/gtkmm/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
> >
> > Does it work now?
> >
> 
> -- 
> []'s
> Pedro
> http://www.cs.nott.ac.uk/~plr/
>  /\  ASCII Ribbon
>  \/  Campaign against
>  /\  HTML e-mail
> /  \

-- 
Sylvain Vedrenne
http://sylvain.vedrenne.free.fr


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