Quantcast
Channel: QtWebEngine
Viewing all articles
Browse latest Browse all 13965

Adding extra classes when building for cross-compilation

$
0
0
I followed the procedure in “Qt 4.7.1 for QNX systems” to achieve cross-compilation. This is the content of the readme.txt file you find when you download the “qt_qnx_2011-02-24b” from Foundry27 qnx portal. Part of this procedure explains how to build for your application so that it can be deployed on your target (see below). 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 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” 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.) The procedure works fine and I am able to build and deploy my QT application on a qnx target. There is a problem though. I have a hirerachy like this SimControl (dir) which contains nto-x86-o (dir) SimControl.pro SimControl.pro.user main.cpp Makefile widget.cpp widget.h widget.ui the nto-x86-o dir contains GNUmakefile main.o Makefile ui_widget.h Now I want to add an extra class, MyNeedle.ccp MyNeedle.h , at “SimControl” directory level. However the makefile system suggested by the procedure does not seem to take this extra class into account and I get an error when I build my application if I include a MyNeedle instance in main.cpp (the application gets built just by running make at SimControl level). As I am not an expert on makefiles and struggle to understand in details what the procudre “Build targets for make” is actually doing I have no idea how to allow the make system to consider this extra class that I want to add to my project (MyNeedle has to be defined this way as I want to override QWidget::paintEvent to draw my own Needle). Does anyone have any idea how I solve this problem? Many Thanks

Viewing all articles
Browse latest Browse all 13965

Trending Articles