This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Trouble with gtk/glib cross developing


Jann - Ove Risvik wrote:
When i try to compile my gtk app, i get this:

jo@crashforsk src $ i386-mingw32msvc-gcc -I/opt/xmingw/include/gtk-2.0 -I/opt/xmingw/lib/gtk-2.0/include -I/opt/xmingw/include/atk-1.0 -I/opt/xmingw/include/pango-1.0 -I/opt/xmingw/include/glib-2.0 -I/opt/xmingw/lib/glib-2.0/include -L/opt/xmingw/lib -lgtk-win32-2.0 -lgdk-win32-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangowin32-1.0 -lgdi32 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0 -lintl -liconv -L/opt/xmingw/lib *.c -o fpu2sse.exe
...
/tmp/ccqOKT2F.o(.text+0x113):main.c: undefined reference to `gtk_statusbar_pop'
/tmp/ccqOKT2F.o(.text+0x130):main.c: undefined reference to `gtk_statusbar_push'

-lfoo may be order-dependent. Try moving the -l's containing the undefined symbols later in the commandline. (You can use a command like nm -A /opt/xmingw/lib/*.lib | grep gtk_statusbar_push to figure out which library contains a symbol, if you need to.)

If there are circular references in the library, you can
either repeat the -l's, or tell ld to keep searching
a group of libraries until all references are resolved, e.g.

gcc ... -Xlinker --start-group -lfoo -lbar --Xlinker --end-group

Good luck.  You might get better answers on a gtk mailing
list, by the way.
- Dan

--
Trying to get a job as a c++ developer?  See http://kegel.com/academy/getting-hired.html

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]