cross compiler question [undefined reference to `QPtrCollection::newItem(void*)]
Dan Kegel
dank@kegel.com
Mon Sep 20 03:45:00 GMT 2004
David Karlton wrote:
>>> main.o(.text+0x64): In function `main':
>>> : undefined reference to `QVBox::QVBox[in-charge](QWidget*, char
>>> const*, unsigned)'
>>> main.o(.gnu.linkonce.d._ZTV6QGList+0x18): undefined reference to
>>> `QPtrCollection::newItem(void*)' ...
>
> In the case above, yes, I have a MIPS compiled version of libqte (not
> libqt, as per the example you showed me). It's explicitly included in
> the link:
>
> /opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/bin/mipsel-unknown-linux-gnu-g++
> -c -pipe -DQWS -fno-exceptions -fno-rtti -O2 -DQT_NO_DEBUG -DQT_SHARED
> -I/home/jml89/qt-mips/mkspecs/default -I. -I.
> -I/home/jml89/qt-mips/include -o main.o main.cpp
> /opt/crosstool/mipsel-unknown-linux-gnu/gcc-3.2.3-glibc-2.2.3/bin/mipsel-unknown-linux-gnu-g++
> -Wl,-rpath,/home/jml89/lib -o dk2 main.o -L/home/jml89/lib -lqte
> main.o: In function `main':
> main.o(.text+0x64): undefined reference to
> `QVBox::QVBox[in-charge](QWidget*, char const*, unsigned)'
> collect2: ld returned 1 exit status
> make: *** [dk2] Error 1
>
>
> Note that I've borrowed a MIPS libqte.so file from another computer when
> trying to cross compile my own code -- only because I was unsuccessful
> at building the MIPS version of libqte.so with crosstool.
>
> When I've tried to use crosstool to compile the Qt/Embedded library
> itself, straight from www.trolltech.com, I get hundreds of the
> "undefined reference" errors. When building libqte.so with native
> compilers, it works no problem.
I have a funny feeling you can't just borrow a C++ shared library from another
computer and expect it to work. I would focus on trying to successfully
crosscompile qt. Might be hard. Here are a few pages that claim to have some
instructions that might help:
http://dudu.dyn.2-h.org/nist/qt-notes.php
http://web.mit.edu/qt_v3.2.1/www/emb-install.html
http://qpe.sourceforge.net/build.html
http://lists.trolltech.com/qt-interest/2003-11/thread00138-0.html
http://opie.handhelds.org/cgi-bin/moin.cgi/BuildingQtForOpie
http://www.linux4.be/~jroark/howto/opie_notes.txt
I haven't tried any of this. Let us know how it goes. You
might need to ask again on a mailing list that knows more about
Qt on embedded systems.
- Dan
--
My technical stuff: http://kegel.com
My politics: see http://www.misleader.org for examples of why I'm for regime change
------
Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
More information about the crossgcc
mailing list