Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Momentics-Qt complexities...: (7 Items)
   
Momentics-Qt complexities...  
Greetings men.
 I’m beginning Neutrino-Qt user, trying out to install Desktop Qt libraries version 4.7.4 from the Qt SDK(http://qt.
nokia.com/downloads/downloads) on the Windows-host Momentics 4.7 for the target VMWare Neutrino 6.5. But  I’m 
confronted with difficulties when I tried to integrate Qt components with Momentics and to run simply Qt console 
application – pattern+printf(“December Qt”);. 
First ldd:FATAL -- when compiled – “ 'FORCE' does not exist - don't know how to make it, No Debug”, but executable 
binary file was created. In Run Configuration the Main insert is marked with red cross, the “Run” button is disabled. 
When I have run it from the tools panel Run->Run I‘ve got a second ldd:FATAL: Could not load library libQtGui.so.4.When
 I have loaded binary file to the WMWare Neutrino-target through ftp and run it without Photon, Neutrino was no answer(#
 was absent).
With it was LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/qnx650/target/qnx6/x86/usr/lib, when is libQtGui.so.4 and others Qt’s
;
PATH=$PATH: /usr/qnx650/target/qnx6/x86/usr/bin.

My steps:
1)Have installed qt_qnx_targets.tar.gz, qt_qnx_host_win32_x86.tar.gz onto my WindowsXP host.
2) Have installed qt_qnx_targets.tar.gz onto Neutrino-6.5 target, directory /usr/qnx650/target.
3)Have installed Desktop Qt libraries 4.7.4 from the Qt SDK, Min-GW, Qt Eclipse Integration, Symbols package.
4)New->Qt Console Application, Project->Run qmake,  Project->Build project(No debug), Run->External Tools->qmake-qnx, 
Run->External Tools->mingw32-make.
5)Run->run(ldd:FATAL: …library libQtGui.so.4), but Run was useless by that time.

What I have missed?

Thanks for answer.
Re: Momentics-Qt complexities...  
>>>5)Run->run(ldd:FATAL: …library libQtGui.so.4), but Run was useless by that time.

I am not familiar with everything you described, but it sounds like when you try to "run" on qnx, you get the above 
error?  

>>>installed qt_qnx_targets.tar.gz on target ... /usr/qnx650/target.

This would explain the LDD runtime error.  libQtGui.so (and all libQt libraries) belong in /usr/lib on the target.

Dennis
Re: Momentics-Qt complexities...  
> >>5)Run->run(ldd:FATAL: …library libQtGui.so.4), but Run was useless by that
>  time.
> 
> I am not familiar with everything you described, but it sounds like when you 
> try to "run" on qnx, you get the above error?  

When I tried to run application on QNX, Neutrino is no answer -- has entered into process of "Qt_binary _fillename" 
without screen сhanges and left it only by Ctrl-z.
" ldd:FATAL: Could not load library libQtGui.so.4 " appears only in the Windows-host Momentics console and in the QNX 
when I did not use LD_LIBRARY_PATH.
 
> >>>installed qt_qnx_targets.tar.gz on target ... /usr/qnx650/target.
> 
> This would explain the LDD runtime error.  libQtGui.so (and all libQt 
> libraries) belong in /usr/lib on the target.

I thought about untrue location libQt*'s... I will try to change it by Monday. Seems strange that deflection 
LD_LIBRARY_PATH doesn't give a pass to libQt*.
Re: Momentics-Qt complexities...  
Dear All,

Firstly, I wish you all Mary Christmas.

I am also new to QNX and  having problem with QT integration. 

According to readme.txt file in QT archive file, I couldn't understand any thing from the topics below how to create a 
QNX target for QT creator.



Build targets for qmake 
-----------------------

If your application is built with qmake, you can create QNX variants of the
application as follows (once the host and target packages are installed).

In the top-level application directory, create a Makefile with the following ( what does top-level  application 
directory mean I don't understand anything, what does it mean with Makefile? is it text document??? Does it want me to 
create Makefile.txt and insert the below text inside to it? )
text:

LIST=OS CPU VARIANT
MAKEFILE=GNUmakefile
include recurse.mk
##eof

Inside the same directory, create subdirectories called "nto-arm-le",
"nto-arm-le-v7", and "nto-x86-o", each containing a file called "GNUmakefile" ( is it a text file??? )
with this text:

ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)
include $(MKFILES_ROOT)/qmake-qt.mk
##eof

The application can be built for all QNX targets by running "make" (where to run?????) at the top
level.  All standard qmake targets should work (e.g., "make install"). ????

Optionally, a ksh script called "build-hook" can be placed at the top level; ( is there a siple way to explain it?? )
if present, it will be executed before running qmake or make.  This is useful
for setting environment variables.  (More advanced hooks are also available;
see $QNX_TARGET/usr/include/mk/build-qmake for details.)


Manual qmake invocation
-----------------------

qmake can also be executed manually; for example:
  "$QNX_HOST/usr/bin/qmake" -spec unsupported/qws/qnx-i386-g++

The following -spec options are available for QNX targets:
  unsupported/qws/qnx-arm-g++
  unsupported/qws/qnx-armv7-g++
  unsupported/qws/qnx-i386-g++
Re: Momentics-Qt complexities...  
>>>I couldn't understand any thing from the topics below how to create a QNX target for QT creator.

AFIK, there is no way to create a QNX binary directly from Qt Creator.   However Qt Creator can still be useful - use it
 to generate the entire UI with "stub" functions for QNX-specific code.

Once the UI works in the Qt Creator host environment, you use the Qt Creator "project file" (and source files) to 
generate a standard "make" file so you can build a QNX binary using a standard QNX build environment.
Re: Momentics-Qt complexities...  
Hello Denis, 

First of all I would like to thank you for your kindly reply.

As I mentioned, I am so new to QNX and embedded system. So I don't understand how to do qt - qnx integration step by 
step. 

Let me introduce what I have done so far in order to run a simple qt code with QNX. 

I have installed  QNX SDP v6.5 on my windows 7 host. I have also Qt 4.7.4 (32 bit) installed with QT Creator 2.4.0. 

Now, I am following the instructions mentioned in readme.txt file. please check my comments between parentheses, if am I
 doing something wrong. I appreciate your kindly support. Thank you.

Installing host tools
---------------------

The following host packages are included:

  qt_qnx_host_win32_x86.tar.gz    Windows, 32-bit x86 ( I unpack it with winrar into the folder of C:\QNX650\host\win32\
x86\usr\bin )

Select the appropriate file for your host system, and use tar to unpack it to
the directory where Momentics was installed; for example:
  tar xzf qt_qnx_host_linux_x86.tar.gz -C /opt/qnx650


Installing target binaries
--------------------------

To build a Qt application for QNX, you'll also need to install the target
package on the build system.  One package contains the binaries for all
currently-available architectures (x86, armle, armle-v7).

Use tar to extract qt_qnx_targets.tar.gz to the directory where Momentics was
installed.  Use the tar command shown in the "installing host tools" section,
with the new filename. ( I unpacked it to specified folders under C:\QNX650\target\qnx6 )

Build targets for qmake
-----------------------

If your application is built with qmake, you can create QNX variants of the
application as follows (once the host and target packages are installed).

(Why we need qmake, what is the top-level application directory, how to create Makefile?)
In the top-level application directory, create a Makefile with the following
text:

LIST=OS CPU VARIANT
MAKEFILE=GNUmakefile
include recurse.mk
##eof

( I definitely no idea how to create GNUmakefile. Should I right click to mouse -> new text document ->changing name to 
GNUmakefile -> put below text inside of it -> save -> erase ".txt" extension. Isthat riight  )
Inside the same directory, create subdirectories called "nto-arm-le",
"nto-arm-le-v7", and "nto-x86-o", each containing a file called "GNUmakefile"
with this text: 

ifndef QCONFIG
QCONFIG=qconfig.mk
endif
include $(QCONFIG)
include $(MKFILES_ROOT)/qmake-qt.mk
##eof

The application can be built for all QNX targets by running "make" at the top
level.  All standard qmake targets should work (e.g., "make install").

Optionally, a ksh script called "build-hook" can be placed at the top level;
if present, it will be executed before running qmake or make.  This is useful
for setting environment variables.  (More advanced hooks are also available;
see $QNX_TARGET/usr/include/mk/build-qmake for details.)


Manual qmake invocation
-----------------------

qmake can also be executed manually; for example:

( where should I write this command? CMD is the right place to write it??? )
  "$QNX_HOST/usr/bin/qmake" -spec unsupported/qws/qnx-i386-g++

The following -spec options are available for QNX targets:
  unsupported/qws/qnx-arm-g++
  unsupported/qws/qnx-armv7-g++
  unsupported/qws/qnx-i386-g++

Target setup
------------
( it says copy files from QNX target system. My questions are: what is target system. Where is it ? Which folder is it??
? If you know can you share me the name of the folder and where is it?  )
Depending on the set of Qt libraries used by your application, it may require
any of the following files and directories to be copied from $QNX_TARGET to
the target system.  Replace $ARCH with the appropriate architecture-specific
directory, such as "armle-v7", but omit this prefix on the target.

  Qt libraries:
    $ARCH/usr/lib/libQt*.so*   (libQt*.so.4 on targets with no symlink...
View Full Message
Re: Momentics-Qt complexities...  
>>> I unpack it with winrar into the folder of C:\QNX650\host\win32\
x86\usr\bin )

The "root" directory of BOTH .tar files on Windows is  "C:\QNX650" - not where you indicated.

You need to study this thread: http://community.qnx.com/sf/discussion/do/listPosts/projects.qt/discussion.general.
topc20245

This thread includes an example project for Qt Creator, and a .pdf document for building/deploying using "self-hosted" 
Momentics.  Later in the thread there is a Windows-hosted "Makefile" which should be useful in your case.

>>>( I have no idea what how to set those, where can I change them??? )
  QWS_KEYBOARD...
These environment variables are set on the "target" system where you want to run the Qt binary - not on windows.