[Glade-users] signal handler problem



Thanks for your answer , I try to compile under Linux with the following commands:

g++ -c -DXTHREADS -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include 
-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/glib-2.0 
-I/usr/lib/glib-2.0/include -I/usr/include/libglade-2.0 main.cpp

and to link

g++ -o Prova -Wl,--export-dynamic main.o -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm 
-lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 -lglade-2.0

when i launch ./Prova i have the same error 

Thanks

Rolando


Michael Ekstrand <mekstran at scl.ameslab.gov> ha scritto: On Wed, 2007-02-14 at 10:16 +0100, salaria113 at 
yahoo.com wrote:
when I try to execute my .exe i have the following :

(ProvaMMI.exe:1808): libglade-WARNING **: could not find signal
handler 'openButtonListener'.
What is wrong in my application ?

Most likely, nothing's wrong in your application per se, but in how
you're compiling it (or specifically, linking it).  libglade depends
upon being able to dlopen() or equivalent the program using it to look
up signal handler functions.  Therefore, your symbols (or at least your
signal handler function symbols) need to be exported.

On Linux with the GNU toolchain, this is accomplished by passing
'-Wl,--export-dynamic' to the GCC line that links the program, and this
exports all externally-visible symbols as dynamic symbols in the
resulting executable.  Libtool, if you're using that to compile, takes
an '-export-dynamic' flag  which automatically passes the appropriate
linker option to the underlying linker.

If you're using the GCC toolchain to build on Windows, a similar
solution may work.  However, more work may be needed - I don't know if
you need to mark your functions as DLLEXPORT or not.  It will also
likely be different if you're using another compiler such as MSVC.  But
now hopefully you know the right avenue to pursue to work out this
problem.

Perhaps someone else around here knows the specific options you need on
Windows.  It would probably be helpful to know which compiler you're
using.

HTH,
- Michael

-- 
Michael Ekstrand
Research Assistant, Scalable Computing Laboratory
Goanna, compute cluster and InfiniBand network monitor tool:
        http://www.scl.ameslab.gov/Projects/Monitor/



                
---------------------------------
 L'email della prossima generazione? Puoi averla con la  nuova Yahoo! Mail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/glade-users/attachments/20070214/04841d0a/attachment.html 




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