OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> The "example" program : Link problems
jdf
post Feb 28 2004, 06:47 AM
Post #1





Group: Members
Posts: 33
Joined: 28-February 04
Member No.: 2,078



This is my 2nd attempt to try to install the tools for developing for the 5500.

I followed the development "HOW TO" exactly for configuring the compiler and loading Qt for embedix. However, when I run make, it seems to work at first using gcc296 and then the messages start flying about undefined objects. Thousands of messages!

In any case I am new to Linux. I can follow instructions. I am using Fedorar Core and I also loaded the "compat-****" files to get the compatible gcc.

If you have already done this, please look at the "How to" for compiler setup and and see if you remember any trick you needed to get it going.

Thankx John
Go to the top of the page
 
+Quote Post
jdf
post Feb 28 2004, 07:16 AM
Post #2





Group: Members
Posts: 33
Joined: 28-February 04
Member No.: 2,078



More info about MY QUESTION ABOVE!

This is the command that make runs:
gcc296 -o example main.o example.o examplebase.o moc_example.o moc_examplebase.o -L/opt/Qtopia/lib -lqpe -lqte

These are the first couple error messages when I run make:

main.o(.text+0x1d): In function `main':
: undefined reference to `QPEApplication::QPEApplication(int&, char**, QApplication::Type)'
main.o(.text+0x3e): In function `main':
: undefined reference to `QPEApplication::showMainWidget(QWidget*, bool)'
main.o(.text+0x46): In function `main':
: undefined reference to `QPEApplication::exec()'
main.o(.text+0x59): In function `main':
: undefined reference to `QPEApplication::~QPEApplication()'

followed by hundreds more!!!!

Here is a directory listing of /opt/Qtopia/lib:
[sharp@Fedora1 example]$ ls /opt/Qtopia/lib
fonts
libqpe.so
libqpe.so.1
libqpe.so.1.5
libqpe.so.1.5.0
libqte.so
libqte.so.2
libqte.so.2.3
libqte.so.2.3.2

Here is the environment variables on my system:
BASH=/bin/bash
BASH_VERSINFO=([0]="2" [1]="05b" [2]="0" [3]="1" [4]="release" [5]="i386-redhat-linux-gnu")
BASH_VERSION='2.05b.0(1)-release'
COLORS=/etc/DIR_COLORS.xterm
COLORTERM=gnome-terminal
COLUMNS=125
CROSSCOMPILE=/opt/Embedix/tools:/usr/local/x86/2.95.3/bin:/opt/Embedix/tools
DESKTOP_SESSION=default
DESKTOP_STARTUP_ID=
DIRSTACK=()
DISPLAY=:0.0
EUID=500
GDMSESSION=default
GNOME_DESKTOP_SESSION_ID=Default
GROUPS=()
GTK_RC_FILES=/etc/gtk/gtkrc:/home/sharp/.gtkrc-1.2-gnome2
G_BROKEN_FILENAMES=1
HISTFILE=/home/sharp/.bash_history
HISTFILESIZE=1000
HISTSIZE=1000
HOME=/home/sharp
HOSTNAME=Fedora1.localhost
HOSTTYPE=i386
IFS=$' tn'
INPUTRC=/etc/inputrc
LANG=en_US.UTF-8
LANGVAR=en_US.UTF-8
LD_LIBRARY_PATH=/opt/Qtopia/lib:
LESSOPEN='|/usr/bin/lesspipe.sh %s'
LINES=41
LOGNAME=sharp
LS_COLORS='no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05
37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.
at=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:
.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.t
=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:
.xpm=00;35:*.png=00;35:*.tif=00;35:'
MACHTYPE=i386-redhat-linux-gnu
MAIL=/var/spool/mail/sharp
MAILCHECK=60
OLDPWD=/home/sharp
OPTERR=1
OPTIND=1
ORG_LD_LIBRARY_PATH=
ORG_PATH=/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/sharp/bin
OSTYPE=linux-gnu
PATH=/usr/local/x86/2.95.3/bin:/opt/Qtopia/bin:/opt/Qtopia/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/home/sharp/bin:/opt/Embedix/tools/bin
PIPESTATUS=([0]="0")
PPID=2534
PROMPT_COMMAND='echo -ne "33]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}07"'
PS1='[u@h W]$ '
PS2='> '
PS4='+ '
PWD=/home/sharp/example
QPEDIR=/opt/Qtopia
QTDIR=/opt/Qtopia
SESSION_MANAGER=local/Fedora1.localhost:/tmp/.ICE-unix/2393
SHELL=/bin/bash
SHELLOPTS=braceexpand:emacs:hashall:histexpand:history:interactive-comments:monitor
SHLVL=2
SSH_AGENT_PID=2446
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
SSH_AUTH_SOCK=/tmp/ssh-tvrA2393/agent.2393
SUPPORTED=en_US.UTF-8:en_US:en:ko_KR.UTF-8:ko_KR:ko
TERM=xterm
TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-x86-g++/
UID=500
USER=sharp
WINDOWID=33554501
XAUTHORITY=/home/sharp/.Xauthority
XMODIFIERS=@im=none
_=set
i=/etc/profile.d/which-2.sh


THANKX FOR ANY HELP OR HINTS YOU CAN PROVIDE!!
JDF
Go to the top of the page
 
+Quote Post
markb
post Feb 28 2004, 09:24 AM
Post #3





Group: Members
Posts: 54
Joined: 28-February 04
From: Birmingham, UK
Member No.: 2,080



I just tried building the example, and it worked for me.
I'll post what I did below in case it's of any use to you.

I run the environment setup script.
Copy the application directory from the examples directory.
Use tmake to create the Makefile.
Then run make.

I hope this helps.

=======

CODE
[mark@dhcp-205-216491 Z]$

[mark@dhcp-205-216491 Z]$

[mark@dhcp-205-216491 Z]$ ls -lrt

total 28

-rw-rw-r--    1 mark     mark        19555 Feb 25 22:25 ir.tar.gz

-rw-rw-r--    1 mark     mark          644 Feb 28 16:48 dev-x86-qpe.sh

-rw-rw-r--    1 mark     mark          636 Feb 28 16:48 dev-arm-qpe.sh

[mark@dhcp-205-216491 Z]$

[mark@dhcp-205-216491 Z]$

[mark@dhcp-205-216491 Z]$

[mark@dhcp-205-216491 Z]$

[mark@dhcp-205-216491 Z]$ cat dev-x86-qpe.sh

#!/bin/bash

# dev-x86-qpe.sh

# location : /usr/bin



if [ -z ${ORG_PATH} ]

then

ORG_PATH=${PATH}

export ORG_PATH

fi



if [ -z ${ORG_LD_LIBRARY_PATH} ]

then

ORG_LD_LIBRARY_PATH=${LD_LIBRARY_PATH}

export ORG_LD_LIBRARY_PATH

fi



CROSSCOMPILE=/opt/Embedix/tools:/usr/local/x86/2.95.3/bin:/opt/Embedix/tools

QPEDIR=/opt/Qtopia

QTDIR=/opt/Qtopia

PATH=/usr/local/x86/2.95.3/bin:$QTDIR/bin:$QPEDIR/bin:${ORG_PATH}:/opt/Embedix/tools/bin

TMAKEPATH=/opt/Qtopia/tmake/lib/qws/linux-x86-g++/

LD_LIBRARY_PATH=$QTDIR/lib:${ORG_LD_LIBRARY_PATH}

export QPEDIR QTDIR PATH TMAKEPATH LD_LIBRARY_PATH PS1

echo "Altered environment for Sharp Zaurus Development x86"

[mark@dhcp-205-216491 Z]$

[mark@dhcp-205-216491 Z]$

[mark@dhcp-205-216491 Z]$

[mark@dhcp-205-216491 Z]$ . ./dev-x86-qpe.sh

Altered environment for Sharp Zaurus Development x86

[mark@dhcp-205-216491 Z]$

[mark@dhcp-205-216491 Z]$

[mark@dhcp-205-216491 Z]$ cp -r /opt/Qtopia/examples/application/ .

[mark@dhcp-205-216491 Z]$

[mark@dhcp-205-216491 Z]$ cd application

[mark@dhcp-205-216491 application]$

[mark@dhcp-205-216491 application]$ ls -l

total 36

-r--r--r--    1 mark     mark         1532 Feb 28 17:06 examplebase.ui

-r--r--r--    1 mark     mark          367 Feb 28 17:06 example.control

-r--r--r--    1 mark     mark          580 Feb 28 17:06 example.cpp

-r--r--r--    1 mark     mark           99 Feb 28 17:06 example.desktop

-r--r--r--    1 mark     mark          271 Feb 28 17:06 example.h

-r--r--r--    1 mark     mark          325 Feb 28 17:06 example.html

-r--r--r--    1 mark     mark         1262 Feb 28 17:06 Example.png

-r--r--r--    1 mark     mark          181 Feb 28 17:06 example.pro

-r--r--r--    1 mark     mark          110 Feb 28 17:06 main.cpp

[mark@dhcp-205-216491 application]$

[mark@dhcp-205-216491 application]$

[mark@dhcp-205-216491 application]$ tmake -o Makefile example.pro

[mark@dhcp-205-216491 application]$

[mark@dhcp-205-216491 application]$

[mark@dhcp-205-216491 application]$ make

/opt/Qtopia/bin/uic examplebase.ui -o ./examplebase.h

g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -DNO_DEBUG -I/opt/Qtopia/include -I/opt/Qtopia/include -o main.o main.cpp

g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -DNO_DEBUG -I/opt/Qtopia/include -I/opt/Qtopia/include -o example.o example.cpp

/opt/Qtopia/bin/uic examplebase.ui -i examplebase.h -o examplebase.cpp

g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -DNO_DEBUG -I/opt/Qtopia/include -I/opt/Qtopia/include -o examplebase.o examplebase.cpp

/opt/Qtopia/bin/moc example.h -o moc_example.cpp

g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -DNO_DEBUG -I/opt/Qtopia/include -I/opt/Qtopia/include -o moc_example.o moc_example.cpp

/opt/Qtopia/bin/moc examplebase.h -o moc_examplebase.cpp

g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -DNO_DEBUG -I/opt/Qtopia/include -I/opt/Qtopia/include -o moc_examplebase.o moc_examplebase.cpp

gcc  -o example main.o example.o examplebase.o moc_example.o moc_examplebase.o  -L/opt/Qtopia/lib -L/opt/Qtopia/lib -lm -lqpe -lqtopia -lqte

[mark@dhcp-205-216491 application]$

[mark@dhcp-205-216491 application]$
Go to the top of the page
 
+Quote Post
markb
post Feb 28 2004, 09:31 AM
Post #4





Group: Members
Posts: 54
Joined: 28-February 04
From: Birmingham, UK
Member No.: 2,080



I just looked at the contents of my /opt/Qtopia/lib directory.
I seem to have a lot more stuff than you.
(Most of it is links though).

Here's what's in mine:

- Markb
CODE
[mark@dhcp-205-216491 application]$ cd /opt/Qtopia/lib

[mark@dhcp-205-216491 lib]$

[mark@dhcp-205-216491 lib]$ ls -lrt

total 17940

-rwxr-xr-x    1 root     root        43860 Jul 29  2003 librsync.so.1.0.0

-rwxr-xr-x    1 root     root      1098452 Jul 29  2003 libqtopiadesktop.so.1.0.0

-rwxr-xr-x    1 root     root       254376 Jul 29  2003 libqd-qtopia.so.1.6.2

-rwxr-xr-x    1 root     root      1086344 Jul 29  2003 libqd-qpe.so.1.5.2

-rwxr-xr-x    1 root     root       297152 Jul 29  2003 libqd-qpepim.so.1.6.2

-rwxr-xr-x    1 root     root        58212 Jul 29  2003 libktar.so.1.0.0

-rwxr-xr-x    1 root     root      8236308 Jul 29  2003 libqt-mt.so.3.1.2

-rwxr-xr-x    1 root     root       358116 Aug 26  2003 libqtopia.so.1.6.2

-rwxr-xr-x    1 root     root       127768 Aug 26  2003 libqtopiacalc.so.1.7.0

-rwxr-xr-x    1 root     root      3952960 Aug 26  2003 libqte.so.2.3.7

-rwxr-xr-x    1 root     root      1276576 Aug 26  2003 libqpe.so.1.5.2

-rwxr-xr-x    1 root     root       316196 Aug 26  2003 libqpepim.so.1.6.2

-rwxr-xr-x    1 root     root        28700 Aug 26  2003 libopenobex.so.0.9.8

-rwxr-xr-x    1 root     root        31872 Aug 26  2003 libgsm.so.1.0.0

-rwxr-xr-x    1 root     root       201444 Aug 26  2003 libfreetype.so.6.0.1

-rwxr-xr-x    1 root     root       160788 Aug 26  2003 libavformat.so.1.0.0

-rwxr-xr-x    1 root     root       722032 Aug 26  2003 libavcodec.so.1.0.0

lrwxrwxrwx    1 root     root           15 Feb 22 16:54 libqte.so.2.3 -> libqte.so.2.3.7

lrwxrwxrwx    1 root     root           15 Feb 22 16:54 libqte.so.2 -> libqte.so.2.3.7

lrwxrwxrwx    1 root     root           15 Feb 22 16:54 libqte.so -> libqte.so.2.3.7

lrwxrwxrwx    1 root     root           15 Feb 22 16:54 libqpe.so.1.5 -> libqpe.so.1.5.2

lrwxrwxrwx    1 root     root           15 Feb 22 16:54 libqpe.so.1 -> libqpe.so.1.5.2

lrwxrwxrwx    1 root     root           15 Feb 22 16:54 libqpe.so -> libqpe.so.1.5.2

lrwxrwxrwx    1 root     root           18 Feb 22 16:54 libqpepim.so.1.6 -> libqpepim.so.1.6.2

lrwxrwxrwx    1 root     root           18 Feb 22 16:54 libqpepim.so.1 -> libqpepim.so.1.6.2

lrwxrwxrwx    1 root     root           18 Feb 22 16:54 libqpepim.so -> libqpepim.so.1.6.2

lrwxrwxrwx    1 root     root           20 Feb 22 16:54 libopenobex.so.0.9 -> libopenobex.so.0.9.8

lrwxrwxrwx    1 root     root           20 Feb 22 16:54 libopenobex.so.0 -> libopenobex.so.0.9.8

lrwxrwxrwx    1 root     root           20 Feb 22 16:54 libopenobex.so -> libopenobex.so.0.9.8

lrwxrwxrwx    1 root     root           15 Feb 22 16:54 libgsm.so.1.0 -> libgsm.so.1.0.0

lrwxrwxrwx    1 root     root           15 Feb 22 16:54 libgsm.so.1 -> libgsm.so.1.0.0

lrwxrwxrwx    1 root     root           15 Feb 22 16:54 libgsm.so -> libgsm.so.1.0.0

lrwxrwxrwx    1 root     root           20 Feb 22 16:54 libfreetype.so.6.0 -> libfreetype.so.6.0.1

lrwxrwxrwx    1 root     root           20 Feb 22 16:54 libfreetype.so.6 -> libfreetype.so.6.0.1

lrwxrwxrwx    1 root     root           20 Feb 22 16:54 libfreetype.so -> libfreetype.so.6.0.1

lrwxrwxrwx    1 root     root           20 Feb 22 16:54 libavformat.so.1.0 -> libavformat.so.1.0.0

lrwxrwxrwx    1 root     root           20 Feb 22 16:54 libavformat.so.1 -> libavformat.so.1.0.0

lrwxrwxrwx    1 root     root           20 Feb 22 16:54 libavformat.so -> libavformat.so.1.0.0

lrwxrwxrwx    1 root     root           19 Feb 22 16:54 libavcodec.so.1.0 -> libavcodec.so.1.0.0

lrwxrwxrwx    1 root     root           19 Feb 22 16:54 libavcodec.so.1 -> libavcodec.so.1.0.0

lrwxrwxrwx    1 root     root           19 Feb 22 16:54 libavcodec.so -> libavcodec.so.1.0.0

drwxr-xr-x    2 root     root         8192 Feb 22 16:54 fonts

lrwxrwxrwx    1 root     root           18 Feb 22 16:54 libqtopia.so.1.6 -> libqtopia.so.1.6.2

lrwxrwxrwx    1 root     root           18 Feb 22 16:54 libqtopia.so.1 -> libqtopia.so.1.6.2

lrwxrwxrwx    1 root     root           18 Feb 22 16:54 libqtopia.so -> libqtopia.so.1.6.2

lrwxrwxrwx    1 root     root           22 Feb 22 16:54 libqtopiacalc.so.1.7 -> libqtopiacalc.so.1.7.0

lrwxrwxrwx    1 root     root           22 Feb 22 16:54 libqtopiacalc.so.1 -> libqtopiacalc.so.1.7.0

lrwxrwxrwx    1 root     root           22 Feb 22 16:54 libqtopiacalc.so -> libqtopiacalc.so.1.7.0

lrwxrwxrwx    1 root     root           17 Feb 22 23:02 libqt-mt.so.3.1 -> libqt-mt.so.3.1.2

lrwxrwxrwx    1 root     root           17 Feb 22 23:02 libqt-mt.so.3 -> libqt-mt.so.3.1.2

lrwxrwxrwx    1 root     root           17 Feb 22 23:02 libqt-mt.so -> libqt-mt.so.3.1.2

lrwxrwxrwx    1 root     root           21 Feb 22 23:02 libqd-qtopia.so.1.6 -> libqd-qtopia.so.1.6.2

lrwxrwxrwx    1 root     root           21 Feb 22 23:02 libqd-qtopia.so.1 -> libqd-qtopia.so.1.6.2

lrwxrwxrwx    1 root     root           18 Feb 22 23:02 libqd-qpe.so.1.5 -> libqd-qpe.so.1.5.2

lrwxrwxrwx    1 root     root           18 Feb 22 23:02 libqd-qpe.so.1 -> libqd-qpe.so.1.5.2

lrwxrwxrwx    1 root     root           21 Feb 22 23:02 libqd-qpepim.so.1.6 -> libqd-qpepim.so.1.6.2

lrwxrwxrwx    1 root     root           21 Feb 22 23:02 libqd-qpepim.so.1 -> libqd-qpepim.so.1.6.2

lrwxrwxrwx    1 root     root           16 Feb 22 23:02 libktar.so.1.0 -> libktar.so.1.0.0

lrwxrwxrwx    1 root     root           16 Feb 22 23:02 libktar.so.1 -> libktar.so.1.0.0

lrwxrwxrwx    1 root     root           16 Feb 22 23:02 libktar.so -> libktar.so.1.0.0

lrwxrwxrwx    1 root     root           17 Feb 22 23:02 librsync.so.1.0 -> librsync.so.1.0.0

lrwxrwxrwx    1 root     root           17 Feb 22 23:02 librsync.so.1 -> librsync.so.1.0.0

lrwxrwxrwx    1 root     root           17 Feb 22 23:02 librsync.so -> librsync.so.1.0.0

lrwxrwxrwx    1 root     root           25 Feb 22 23:02 libqtopiadesktop.so.1.0 -> libqtopiadesktop.so.1.0.0

lrwxrwxrwx    1 root     root           25 Feb 22 23:02 libqtopiadesktop.so.1 -> libqtopiadesktop.so.1.0.0

lrwxrwxrwx    1 root     root           25 Feb 22 23:02 libqtopiadesktop.so -> libqtopiadesktop.so.1.0.0

[mark@dhcp-205-216491 lib]$
Go to the top of the page
 
+Quote Post
jdf
post Feb 28 2004, 10:39 AM
Post #5





Group: Members
Posts: 33
Joined: 28-February 04
Member No.: 2,078



markb...Thankx a lot for answering quickly. encourafged me to keep trying.

I have reached success too!!

THIS IS WHAT I THINK THE PROBLEM WAS:

HOWTO step 2 says download the free Qtopia
qtopia-free-1.5.0-1.i386.rpm

I did that and got a lot of errors. I then found at another source a suggestion to change the tmake.conf file so that it uses the 2.96 compiler. I did that to.

That installation resulted in the original questions.

CURRENT configuration.
1) removed qtopia-free-1.5.0-1.i386.rpm
2) installed from trolltech the latest : qtopia-free-1.7.0-2rh9.i386.rpm
3) DON't use a different tmake, use as provided in the updated rpm.
4) Then from my home directory did these commands:
source ./dev-x86-qpe.sh
cp -r /opt/Qtopia/examples/application/ .
(had some permission problems that I needed to fix before copying)
cd application
tmake -o Makefile example.pro
make

5) Everything went FINE. exactly like your listing above, opened the frame buffer and executed the command. SUCCESS!!

Now my question to be found out as I experiment more: What was all the issues about having to use the 2.96 versions of compiler? It looks like my success is based on NOT using the gcc296!!! Am I going to be up against that when I cross-compile for the zaurus?

Thakx so much for givng encouragement to us exitied newbies!

John
Go to the top of the page
 
+Quote Post
markb
post Feb 28 2004, 11:33 AM
Post #6





Group: Members
Posts: 54
Joined: 28-February 04
From: Birmingham, UK
Member No.: 2,080



I'm glad you got it working!
I'm not sure what the issue with the compiler version is.
I'm using RH8.0 so didn't pay any attention to that bit in the HOWTO for SuSE users.

I seem to have version 3.2

CODE
[mark@dhcp-205-216491 mark]$ g++ --version

g++ (GCC) 3.2 20020903 (Red Hat Linux 8.0 3.2-7)

Copyright (C) 2002 Free Software Foundation, Inc.

This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.



I did some cross-compilation last year for my SL-5000D, but that was on an old computer. I haven't set it up on this computer yet.
I have that joy to look forward to. :-)
(But from what I remember it wasn't too tricky to set up.)

I'm waiting for my C860 to arrive, hopefully next week, then I'll get stuck in and have a go.

- markb
Go to the top of the page
 
+Quote Post
Ragnorok
post May 26 2005, 07:30 AM
Post #7





Group: Members
Posts: 298
Joined: 27-October 03
From: Greenfield, NH
Member No.: 781



- I think the older version of qtopia, the one you're no longer using, jdf, requires the older compiler. Mine got the same linker errors you experienced until I cottoned onto the fact that I hadn't updated tmake.conf yet. (drool) After that, no problems at all.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 31st October 2014 - 10:19 PM