Help - Search - Members - Calendar
Full Version: Qtpoia SDK problems
OESF Portables Forum > Everything Else > Archived Forums > Zaurus General Forums > Desktop Operating Systems Issues > Linux Issues
I have tryed out (the qtopia start guide).
But after tmake -o Makefile (for the PDA), i get an error:
/usr/bin/perl: error while loading shared libraries: /opt/Qtopia/sharp/lib/ ELF file OS ABI invalid .
Could you help me?
Please, mabye it`s a newby question, but I`am a newby and have to start somewhere.

Bye the way does Opie have the possibility of autostarting applications? sad.gif sad.gif sad.gif
I tried my first cross compile last evening on a RedHat 9.0 desktop using this page's notes:

I used the latest TrollTech binaries distribution:

- Qtopia 1.7.0 GPL SDK Linux for Red Hat 9

Installed the RPM, which includes tmake. (Note, if you install this RPM, don't copy the tmake.conf file as indicated in step 1 of the How-To. The Qtopia package is configured to work witth the RedHat 9 gcc installation as is.)

I had a similar error message from Perl when I tried to compile. I then realized that /usr/bin/perl requires the *desktop* file to run. (Actually, so did "ls" and every other command I tried to run on the command line!) It was trying to reference the ARM compiled as your message indicates.

After sourcing the arm dev setup script in section 3, step 4 of the ARM compile, I set the following variable on the command line:


This gave me back my basic command line commands and allowed me to compile without problems. Transfered this wirelessly to my SL-5600 and started it on the command line as per the instructions. Worked like a charm!

I can't say for sure if this is the best idea in general because I don't know if the library search order will pick something out of here first instead of the Qtopia area for the final arm binary. Bit of a chicken and egg problem. Perhaps using dynamically linked binaries solves this by having an equivalent path to on the Z? Just a guess.

Don't know about OPIE. I'm using the Sharp 3.1 ROM on the SL-5600.

Happy compiling!
/usr/bin/perl: error while loading shared libraries: /opt/Qtopia/sharp/lib/ ELF file OS ABI invalid .

Stay away vom scripts tinkering with LD_LIBRARY_PATH. The people who invented those didn't understand about cross compiling. Changing the LD_LIBRARY_PATH is _neither_ necessary _nor_ effective when cross compiling.

Bye the way does Opie have the possibility of autostarting applications?

Yes (of course biggrin.gif) - see the Opie-Today application for an example of how to register with the launcher to become an autostart application.
I am using Fedora1 core, which I guess is similar toRedhat9 , following jay's post above I have compiled and run the x86 qtopia environment and examplpe application successfully. I get the same problem jay had when I tried it for the ARM develeopment enviroment. I tried jay's suggestion by typing this at the shell prompt.:


But this did not change anything, and I still have the same problem running any command such as "ls" etc....

I am not great at Linux, but I can follow directiosn pretty good! Anyone have a suggestion to try?

I just tried cross-compiling and hit the same problems.
I tried putting /usr/lib at the start of my LD_LIBRARY_PATH but that didn't help much.
So I went to another shell, and did "ldd /bin/ls" to find out where it usually finds the libraries.

[mark@dhcp-205-216491 application]$ ldd /bin/ls => /lib/ (0x40014000) => /lib/ (0x40019000) => /lib/i686/ (0x42000000) => /lib/ (0x4001f000)

       /lib/ => /lib/ (0x40000000)

[mark@dhcp-205-216491 application]$

[mark@dhcp-205-216491 application]$

So I added /lib at the start of my LD_LIBRARY_PATH and that fixed the problem.

[mark@dhcp-205-216491 application]$ echo $LD_LIBRARY_PATH


[mark@dhcp-205-216491 application]$

Now I can use normal shell commands and do the make.
The example app (/opt/Qtopia/examples/application) compiles OK, but won't link.

Has anybody come across these errors before:

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

arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/

Qtopia/sharp/include -o main.o main.cpp

arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/

Qtopia/sharp/include -o example.o example.cpp

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

arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/                                     Qtopia/sharp/include -o examplebase.o examplebase.cpp

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

arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/                                     Qtopia/sharp/include -o moc_example.o moc_example.cpp

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

arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/                                     Qtopia/sharp/include -o moc_examplebase.o moc_examplebase.cpp

arm-linux-gcc  -o example main.o example.o examplebase.o moc_example.o moc_examplebase.o  -L/opt/Qtopia/sharp/lib -L/opt/Qtopia/sharp/lib -lqpe -l                                     qtopia -lqte

/opt/Embedix/tools/arm-linux/bin/ld: warning:, needed by /opt/Qtopia/sharp/lib/, not found (try using -rpath or -rpath-li                                     nk)

/opt/Embedix/tools/arm-linux/bin/ld: warning:, needed by /opt/Qtopia/sharp/lib/, not found (try using -rpath or -rpath-link                                     )

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_read_scanlines'

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_set_defaults'

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_start_decompress'

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_destroy_decompress'

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_std_error'

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_CreateDecompress'

/opt/Qtopia/sharp/lib/ undefined reference to `uuid_generate'

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_read_header'

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_start_compress'

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_destroy_compress'

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_finish_decompress'

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_resync_to_restart'

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_CreateCompress'

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_finish_compress'

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_set_quality'

/opt/Qtopia/sharp/lib/ undefined reference to `jpeg_write_scanlines'

collect2: ld returned 1 exit status

make: *** [example] Error 1

Any help would be greatly appreciated.
If I fiind a solution myself I'll post it here.

- markb
I get the exact same problem, while compilling snes9x/SDL.

I'm looking into it at the moment, if I find a solution I'll post. If anyone else knows what it's due to Ill greatly apreciate the answer...
I've found a partial answer.

If I copy and paste the liine that does the linking and add two missing libraries (uuid and jpeg) then it works OK.

[mark@dhcp-205-216491 application]$

[mark@dhcp-205-216491 application]$ arm-linux-gcc  -o example main.o example.o examplebase.o moc_example.o moc_examplebase.o  -L/opt/Qtopia/sharp/lib -L/opt/Qtopia/sharp/lib -lqpe -lqtopia -lqte -luuid -ljpeg

So that works, but I can't work out why those libraries don't get put in the makefile automatically. I tried recreating the Makefile and it didn't make any difference.

So I have a workaround but not a proper solution.
Anyone got any ideas?

- markb
OK solved my original question.... I also added the /usr/lib and /lib to the LD_LIBRARY_PATH and I am progressin g to the same point you are with the missing uuid and jpeg libraryies. My output looks exactly like yours. I hope you all figure out the next step!!

Sorry I can't help with a solution, but I appreciate you knowledgeable people sharing your insite with us new linux users. (Fedora Core 1)

I now how have a full solution.
It works for me, but I can't guarantee this is the *RIGHT* way to do it.

Look at your environment and see what $TMAKEPATH is set to.
That tells you where tmake picks up the tmake.conf file.
You can then edit that file and add the missing libraries.
(You'll need to be root to edit the file)

Then you need to run tmake again to recreate your makefile.

I edit tmake.conf and change this line:

TMAKE_LIBS              = -ljpeg -luuid

I don't know if that's the best line to change but it works.

[mark@dhcp-205-216491 application]$

[mark@dhcp-205-216491 application]$ echo $TMAKEPATH


[mark@dhcp-205-216491 application]$

[mark@dhcp-205-216491 application]$

[mark@dhcp-205-216491 application]$ cd /opt/Qtopia/tmake/lib/qws/linux-sharp-g++/

[mark@dhcp-205-216491 linux-sharp-g++]$

[mark@dhcp-205-216491 linux-sharp-g++]$ ls -ltr

total 16

-r--r--r--    1 root     root           76 Sep 20  2002 subdirs.t

-r--r--r--    1 root     root           72 Sep 20  2002 lib.t

-r--r--r--    1 root     root           72 Sep 20  2002 app.t

-r--r--r--    1 root     root         1813 Feb 29 22:59 tmake.conf

[mark@dhcp-205-216491 linux-sharp-g++]$

[mark@dhcp-205-216491 linux-sharp-g++]$

[mark@dhcp-205-216491 linux-sharp-g++]$ vi tmake.conf

[mark@dhcp-205-216491 linux-sharp-g++]$

[mark@dhcp-205-216491 linux-sharp-g++]$ cd ~/dev/z

[mark@dhcp-205-216491 z]$

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

[mark@dhcp-205-216491 application]$

[mark@dhcp-205-216491 application]$ rm Makefile

[mark@dhcp-205-216491 application]$

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

[mark@dhcp-205-216491 application]$

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

rm -f main.o example.o examplebase.o moc_example.o moc_examplebase.o moc_example.cpp moc_examplebase.cpp examplebase.cpp examplebase.h example

rm -f *~ core

[mark@dhcp-205-216491 application]$

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

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

arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/Qtopia/sharp/include -o main.o main.cpp

arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/Qtopia/sharp/include -o example.o example.cpp

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

arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/Qtopia/sharp/include -o examplebase.o examplebase.cpp

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

arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/Qtopia/sharp/include -o moc_example.o moc_example.cpp

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

arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/opt/Qtopia/sharp/include -I/opt/Qtopia/sharp/include -o moc_examplebase.o moc_examplebase.cpp

arm-linux-gcc  -o example main.o example.o examplebase.o moc_example.o moc_examplebase.o  -L/opt/Qtopia/sharp/lib -L/opt/Qtopia/sharp/lib -ljpeg -luuid -lqpe -lqtopia -lqte

[mark@dhcp-205-216491 application]$

I hope that helps.

- markb
OK! are the man! by changing that tmake.conf everything works great for me. I'd appreciate if you can help with the next step or direct me to a link that would help.
Here's what is working fine right now on my Fedora Core Linux:
1) in the x86 environment, compile make example
2) load the frame buffer and run the example successfully
3) switch to ARM environment
4) compile and link and produce "example" executable for arm with no errors.

Now, not sure if I have to make an ipk, but I just copied the "example" to my Zaurus 5500 and went to a shell using "terminal". I then try to run "example" from the command line on Zaurus. It starts and then indicates that it cannot find several libraries for QT.

My next step would be to make an ipk, but I haven't read everything yet about ipk. I really was hoping I could get a quick test from the Zaurus command line.

Any thoughts?
Happy to hear things are working for you!

It's been a while since I've actually tried running anything on the zaurus itself. But I blew the dust off my old 5000D and gave it a try.

I got the same problem as you.
I thought a quick fix would be to set the LD_LIBRARY_PATH on the zaurus, but that didn't work.

I had a look around and couldn't find that missing library anywhere on the Zaurus.

It turns out that you don't actually need it!
I recompiled the example application and missed off that library. It still compiled and linked OK. And it now runs on the Zaurus.

So all you need to do is change your tmake.conf file again, and take out the bit that specifies "-lqtopia". I just left it blank:


If you do a "make clean" and use tmake to regenerate your Makefile, it should all build properly, and run on the Zaurus.

When I did some Z development ages ago I don't remember needing to tweak things so much. It all seemed to work first time.
I wonder if anyone tested these things? Or maybe it's just us two that are having these problems? :-)

Let me know how you get on.

- Mark

You said several libraries weren't found. It only mentioned one when I tried it. If you still have problems could you let me know what the other libraries are. Thanks.
Great I'll try it when I get home tonight. I really appreciate you walking me through these problems. I'd be dead in the water due to my lack of experience and knowledge right now. Thankx a lot. Once it does all work I'll put a HOW TO based on my Fedora Core and your tweaks and share it.
Next step: my first ipk and then trying a development environment
Thankx markb
the directions for making the ipk worked as written. I was able to make it and install on the 5500. I am now off to try an make my own progs.

I did have one problem: I couldn't find

But I found it here. Looks like an old mirror of all the Zaurus docs. I tried finding them on ZUG, but no success.

Thankx mark for all you help!! Hopefully I can develop something intersting!

Hi All,

Been travelling a bit. Looks like a lot of progress has been made. Just wanted to make two clarifications. First, in my original posting, the LD_LIBRARY_PATH should indeed be set to /lib, not /usr/lib. Sorry for the mistake. Also, I ended up just adding "-ljpeg -luuid" to the generated Makefile under the $(LIBS) section, but adding it to TMAKE_LIBS looks like a more consistant solution.

You guys have inspired me to try and compile some more things! Congratulations on getting it all to work.
Going back to all of your problems with setting LD_LIBRARY_PATH......

I'm sure you all noted that there are two sets of instructions, the first set is to compile a native application which will run on your x86 Linux machine (these instructions tell you to set LD_LIBRARY_PATH), the second set (which doesn't set LD_LIBRARY_PATH) is for cross-compiling.

I think the problems we've been having are due to the environment setup scripts and configuration files.

Even though the 2nd set of instructions doesn't explicitly tell you to set LD_LIBRARY_PATH, it gets set anyway when you run the script.
Unfortunately it sets it in such a way that it stops you from running commands in the shell. :-(

And the tmake.conf file that gets installed seems to be incorrect too. It misses out some libraries, and includes some that aren't available on the Zaurus.

As I mentioned in a previous post, it all seemed to work first time without any tweaking when I went through this a year or two ago.
But I had to download all the tools and scripts again on my new PC, and it didn't go as smoothly this time.
Maybe there are different versions available, and we got the wrong ones?

Still, two minor edits isn't much to complain about. :-)
It's still fairly easy to get up an running.

I'm looking forward to seeing what jdf and jay produce for the Zaurus.
But not as much as I'm looking forward to getting my C860 in the post. :-)

Hopefully this week!
(Come on ShirtPocket, don't let me down)

- Mark
Yes, the problem is due to the scripts. The setup scripts for the ARM compile do modify LD_LIBRARY_PATH to point to /opt/Qtopia/lib. Unfortunately, tmake runs on x86, and uses perl, which is searching for /lib/ Because of the LD_LIBRARY_PATH is changed, the x86 perl job is trying to reference the ARM library.

I agree this may not be the best approach. (Certainly isn't clean.) Yes, there are work-arounds, but what exactly *is* the "correct" solution here? If you are not using LD_LIBRARY_PATH for your system, how do you tell the compiler where you should be picking up the libraries from?

Sorry if this is a gcc101 question. My experience is in Unix software support, not development. LD_LIBRARY_PATH is used for a great many commercial applications, and I wasn't aware there are methods of getting around it. Any constructive input would be appreciated.

Yes the scripts had to be changed for whatever reason. I am a civil engineer with not much experience in linux or cpp but I have written programs in C as a hobby and long ago in quickbasic. I caved in and bought the "programming with QT 3" book today which came with a cd for Windows and a borland cpp compiler. I think it will be easier for me to get up to speed and learn on windows then move my developed apps to linux and then to zaurus. Interestingly, the compiler wouldn't work despite following the book directions exactly. It wasn't finding a lib. Based on my experience here I knew right where to go!! I had to change the "qmake" configuration files much like we had to do here!! Anyway, I would have never figured out how to fix the windows version if I hadn't learned how to fix the linux version from you all!!
LD_LIBRARY_PATH should not be altered for a cross compile. The compiler itself knows that it should look in ../lib relative to itself (and so on) to find the lib files.

I can cross-compile quite happily using the following source script.
To do Qtopia stuff just add in the QPEDIR=/opt/Qtopia, QTDIR=/opt/Qtopia part assuming that's where they are - and they are by default)




PS1='!OZ-dev-armu@h:w$ '

echo "Altered environment for OZ 3.3.2 Development"

Take a look at this thread:

Although it's for OZ and for GCC3.x it's the same idea. You just alter the PATH so that the gcc, ld, etc which are used are the cross-toolchain ones. No need to alter LD_LIBRARY_PATH - and in any case why would you want to alter the path which Linux uses to *load* libraries (not to link them).

It would be nice to get a fixed version of the script put into the download area, with the troublesome LD_LIBRARY_PATH bit removed. Just so other people don't come across the same problems.

- Mark
This qtopia-free-1.7.0-2rh9.i386.rpm only had 1 example program, which doesn't do much.

Where can I get the rest of the examples?

I really can't get much further unless I get those examples..... :cry: so that I can learn.

I have the examples from the 3.3 release for windows which differ slightly from the older releases and I get errors when I compile them, but they compile fine on windows.

For example the "tictac" program:
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -DNO_DEBUG -I. -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. -I/opt/Qtopia/include -o tictac.o tictac.cpp
/opt/Qtopia/bin/moc tictac.h -o moc_tictac.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -DNO_DEBUG -I. -I/opt/Qtopia/include -o moc_tictac.o moc_tictac.cpp

gcc -o tictac main.o tictac.o moc_tictac.o -L/opt/Qtopia/lib -lm -lqte
/opt/Qtopia/lib/ undefined reference to `QWizard::staticMetaObject()'
collect2: ld returned 1 exit status
make: *** [tictac] Error 1

Hi jdf,

I'll have a go and see if I can reproduce your problem.
But I'll need to get hold of the source first.
If you happen to know where I can download it, it would be a big help.

I can see it on the trolltech site, here:
But I don't know if that's the same as yours. And it would be nice to get the same project file as you in case it's a config problem.

I have noticed one thing though.
The last line of the build, where it does the final link:
gcc -o tictac main.o tictac.o moc_tictac.o -L/opt/Qtopia/lib -lm -lqte

It only specifies qte and not qpe and qtopia.
Maybe it should say:

gcc -o tictac main.o tictac.o moc_tictac.o -L/opt/Qtopia/lib -lm -lqte -lqpe -lqtopia

It's just a guess. But worth a try. :-)

- Mark

If you haven't tried it already, you may want to try regenerating your Makefile.

make clean
tmake -o Makefile *.pro

and then try re-building.

Problem solved.
Thankx. Yes the source is same as your link.
I had already make clened and remade Makefiles several times and each time got the same error.
Based on your observation about the libs, I looked at the .pro files. That is the source of problem. I thought these were autogenerated by qmake somehow.
In any case, i edit the .pro file to have same options as the, and I am back in business!!
BAD file:
# Input
HEADERS += tictac.h
SOURCES += main.cpp tictac.cpp
GOOD file:
HEADERS += tictac.h
SOURCES += main.cpp tictac.cpp
#CONFIG += qtopia warn_on debug
CONFIG += qtopia warn_on release
TARGET = tictac

I tried the same fix on 4 other sample programs and ALL IS WORKING FINE NOW!!!! Thankx for the clue.

Hi everybody,
I put up this topic because it is really interesting.
I've got a question to all of the persons which understand this topic.

I made an application with qt and now I'm changing it to qtopia, in order to put it on a zaurus.

I post the code a this application, I've got an erroer during the compilation.

arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W - O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o main.o main.cpp
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W - O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o compass.o compass.c pp
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W - O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o map.o map.cpp
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W - O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o MyThread.o MyThread .cpp
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W - O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o process.o process.c pp
/opt/Qtopia/sharp/bin/moc compass.h -o moc_compass.cpp
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W - O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o moc_compass.o moc_c ompass.cpp
/opt/Qtopia/sharp/bin/moc map.h -o moc_map.cpp
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W - O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o moc_map.o moc_map.c pp
/opt/Qtopia/sharp/bin/moc process.h -o moc_process.cpp
arm-linux-g++ -c -pipe -DQT_QWS_SL5XXX -DQT_QWS_CUSTOM -DQWS -fno-exceptions -fno-rtti -Wall -W - O2 -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/sharp/include -o moc_process.o moc_p rocess.cpp
arm-linux-gcc -o gpus main.o compass.o map.o MyThread.o process.o moc_compass.o moc_map.o moc_pr ocess.o -L/opt/Qtopia/sharp/lib -ljpeg -luuid -lqte-mt -lpthread
/opt/Embedix/tools/arm-linux/bin/ld: cannot find -lqte-mt
collect2: ld returned 1 exit status
make: *** [gpus] Erreur 1

I follow the topic and success the compilation of example, I try it on Z and it's good.

the problem is with lqte.

I use a thread in my code.
You need -lqte *not* -lqte-mt

The version of QT on the Zaurus is not the multithreaded one. This doesn't mean that you can't use threads but only one thread is allowed to do any gui work.

If you have asked for threads in the CONFIG section you should remove it - this will change the -lqte-mt to -lqte
Thanks TimW,
I have no more the problem after have erase thread from

But, I've got one more problem, but I think it's a problem of understanding .
Indeed, I've got a gpus.ui and I want to include gpus.h in my main.cpp.
gpus.h is created by qt,.

I hope you understand my problem of comprehension in order to explain me how I can do this.

don't forget that I put my code in a precedent answer.


I have to use a thread in my application written in qt, and I'm changing it to qtopia 1.7

if i write : CONFIG += qtopia warn_on release
in my

I've got this error :

MyThread.h:5: error: erreur d'analyse syntaxique before `{' token

#ifndef MYTHREAD_H
#define MYTHREAD_H
#include <qthread.h>

class MyThread : public QThread{

virtual void run();


--> I think it doesn't find qthread.h


if if i write : CONFIG += qtopia warn_on release thread
in my

I've got this error :

pc3c15:/v3# make
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/include -I/opt/Qtopia/include -o main.o main.cpp
main.cpp:18:2: attention : pas de retour chariot à la fin du fichier
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/include -I/opt/Qtopia/include -o compass.o compass.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/include -I/opt/Qtopia/include -o map.o map.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/include -I/opt/Qtopia/include -o process.o process.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/include -I/opt/Qtopia/include -o gpusui.o gpusui.cpp
gpusui.cpp:118:2: attention : pas de retour chariot à la fin du fichier
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/include -I/opt/Qtopia/include -o MyThread.o MyThread.cpp
MyThread.cpp:159:43: attention : pas de retour chariot à la fin du fichier
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/include -I/opt/Qtopia/include -o gpus.o gpus.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/include -I/opt/Qtopia/include -o settingsdialog.o settingsdialog.cpp
/opt/Qtopia/bin/moc compass.h -o moc_compass.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/include -I/opt/Qtopia/include -o moc_compass.o moc_compass.cpp
/opt/Qtopia/bin/moc map.h -o moc_map.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/include -I/opt/Qtopia/include -o moc_map.o moc_map.cpp
/opt/Qtopia/bin/moc process.h -o moc_process.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/include -I/opt/Qtopia/include -o moc_process.o moc_process.cpp
/opt/Qtopia/bin/moc gpusui.h -o moc_gpusui.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/include -I/opt/Qtopia/include -o moc_gpusui.o moc_gpusui.cpp
/opt/Qtopia/bin/moc gpus.h -o moc_gpus.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/include -I/opt/Qtopia/include -o moc_gpus.o moc_gpus.cpp
/opt/Qtopia/bin/moc settingsdialog.h -o moc_settingsdialog.cpp
g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -fno-default-inline -D_REENTRANT -DNO_DEBUG -DQT_THREAD_SUPPORT -I/opt/Qtopia/include -I/opt/Qtopia/include -o moc_settingsdialog.o moc_settingsdialog.cpp
gcc -o gpus main.o compass.o map.o process.o gpusui.o MyThread.o gpus.o settingsdialog.o moc_compass.o moc_map.o moc_process.o moc_gpusui.o moc_gpus.o moc_settingsdialog.o -L/opt/Qtopia/lib -L/opt/Qtopia/lib -lm -lqpe -lqtopia -lqte-mt -lpthread
/usr/bin/ld: ne peut trouver -lqte-mt
collect2: ld a retourné 1 code d'état d'exécution
make: *** [gpus] Erreur 1

-> it find qthread.h but he's got a problem in the link edition

Have you got a suggestion for me ?

Are you using qt/e3?
Qtopia only works with qt embedded 2.3.x, latest version of which is 2.3.10
It won't work with qt embedded 3

QUOTE(Matthieu @ Apr 3 2005, 12:23 AM)

-> it find qthread.h but he's got a problem in the link edition

Have you got a suggestion for me ?

No, I'm using the version 2.3.7 of qt embedded.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2018 Invision Power Services, Inc.