cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
7,759 Views
Registered: ‎04-16-2013

Opening QT application in SDK

Hello, 

 

I am working with Zynq board(ZC702) and I have downloaded http://www.wiki.xilinx.com/Zynq+Base+TRD+14.5, this application to understand the video interface.

 

I am ok with running sobel_cmd, but when I imported sobel_qt, there are some inclusion errors, May I please know how include the qt headers or any other which will allow me to analyse the code and modify!... 

0 Kudos
14 Replies
Highlighted
Scholar
Scholar
7,744 Views
Registered: ‎09-05-2011

Hi, 

 

What error do you see?

 

Can you post the log?

 

Regards,

0 Kudos
Highlighted
Contributor
Contributor
7,723 Views
Registered: ‎04-16-2013

Hi,

 

Please find attached list of errors. 

 

Thanks.

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
7,706 Views
Registered: ‎12-08-2011

Have you followed the instruction on the wiki for compiling the Qt/Qwt libraries and are you pointing the ZYNQ_QT_INSTALL environment variable to your install dir?

 

http://www.wiki.xilinx.com/Zynq+Base+TRD+14.5#x-9%20Building%20the%20Video%20Software%20Application%28s%29-9.3%20Building%20the%20sobel%20Qt%20GUI%20Linux%20application.

 

0 Kudos
Highlighted
Contributor
Contributor
7,696 Views
Registered: ‎04-16-2013

Hello,

 

Yes, I have followed the steps to install the Qt/Qwt libraries. But , I haven't poitned to ZYNQ_QT_INSTALL environment variable to install dir...

 

Please let me know the steps...

0 Kudos
Highlighted
Contributor
Contributor
7,682 Views
Registered: ‎04-16-2013

Hello,

 

To add, my Makefile looks like this...

 

#############################################################################
# Makefile for building: sobel_qt
# Generated by qmake (2.01a) (Qt 4.7.3) on: Wed Feb 27 18:31:58 2013
# Project: sobel_qt.pro
# Template: app
# Command: /home/radheys/QT_INSTALL/bin/qmake -o Makefile sobel_qt.pro
#############################################################################

# Set path to Qt libraries
# Alternatively set environment variable to point to Qt libraries
export ZYNQ_QT_INSTALL =/usr/local/Trolltech/Qt-4.7.3

 

# Set path to Sobel library
SOBEL_LIB = ../sobel_lib

####### Compiler, tools and options

CC = ${CROSS_COMPILE}gcc
CXX = ${CROSS_COMPILE}g++
DEFINES = -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = ${CROSS_COMPILE_CFLAGS} -I$(ZYNQ_QT_INSTALL)/include -DZYNQ -O3 -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = ${CROSS_COMPILE_CPPFLAGS} -I$(ZYNQ_QT_INSTALL)/include -DZYNQ -O3 -Wall -W -D_REENTRANT $(DEFINES)
INCPATH = -I$(ZYNQ_QT_INSTALL)/mkspecs/qws/linux-arm-gnueabi-g++ -I. -I$(ZYNQ_QT_INSTALL)/include/QtCore -I$(ZYNQ_QT_INSTALL)/include/QtNetwork -I$(ZYNQ_QT_INSTALL)/include/QtGui -I$(ZYNQ_QT_INSTALL)/include -Imoc -Iui -I$(SOBEL_LIB)/include
LINK = ${CROSS_COMPILE}g++
LFLAGS = -L$(ZYNQ_QT_INSTALL)/lib -Wl,-O1 -Wl,-rpath,$(ZYNQ_QT_INSTALL)/lib
LIBS = $(SUBLIBS) -L$(ZYNQ_QT_INSTALL)/lib -lqwt -L$(SOBEL_LIB)/Debug -lsobel_lib -lQtGui -L$(ZYNQ_QT_INSTALL)/lib -lQtNetwork -lQtCore -lpthread
AR = ${CROSS_COMPILE}ar cqs
RANLIB =
QMAKE = $(ZYNQ_QT_INSTALL)/bin/qmake
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
STRIP = ${CROSS_COMPILE}strip
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p

####### Output directory

OBJECTS_DIR = obj/

####### Files

SOURCES = qt_app/mainwindow.cpp \
qt_app/main.cpp \
qt_app/cpustat.cpp \
qt_app/cpuplot.cpp \
qt_app/membwplot.cpp moc/moc_mainwindow.cpp \
moc/moc_cpuplot.cpp \
moc/moc_membwplot.cpp \
qrc_resourcefile.cpp
OBJECTS = obj/mainwindow.o \
obj/main.o \
obj/cpustat.o \
obj/cpuplot.o \
obj/membwplot.o \
obj/moc_mainwindow.o \
obj/moc_cpuplot.o \
obj/moc_membwplot.o \
obj/qrc_resourcefile.o
DIST = $(ZYNQ_QT_INSTALL)/mkspecs/common/g++.conf \
$(ZYNQ_QT_INSTALL)/mkspecs/common/unix.conf \
$(ZYNQ_QT_INSTALL)/mkspecs/common/linux.conf \
$(ZYNQ_QT_INSTALL)/mkspecs/common/qws.conf \
$(ZYNQ_QT_INSTALL)/mkspecs/qconfig.pri \
$(ZYNQ_QT_INSTALL)/mkspecs/features/qt_functions.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/qt_config.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/exclusive_builds.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/default_pre.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/release.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/default_post.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/warn_on.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/qt.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/unix/thread.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/moc.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/resources.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/uic.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/yacc.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/lex.prf \
sobel_qt.pro
QMAKE_TARGET = sobel_qt
DESTDIR =
TARGET = sobel_qt

first: all
####### Implicit rules

.SUFFIXES: .o .c .cpp .cc .cxx .C

.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"

.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"

####### Build rules

all: mkdirs Makefile $(TARGET)

$(TARGET): ui/ui_mainwindow.h ui/ui_mainwindow720.h $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)

Makefile: sobel_qt.pro $(ZYNQ_QT_INSTALL)/mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf $(ZYNQ_QT_INSTALL)/mkspecs/common/g++.conf \
$(ZYNQ_QT_INSTALL)/mkspecs/common/unix.conf \
$(ZYNQ_QT_INSTALL)/mkspecs/common/linux.conf \
$(ZYNQ_QT_INSTALL)/mkspecs/common/qws.conf \
$(ZYNQ_QT_INSTALL)/mkspecs/qconfig.pri \
$(ZYNQ_QT_INSTALL)/mkspecs/features/qt_functions.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/qt_config.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/exclusive_builds.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/default_pre.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/release.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/default_post.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/warn_on.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/qt.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/unix/thread.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/moc.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/resources.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/uic.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/yacc.prf \
$(ZYNQ_QT_INSTALL)/mkspecs/features/lex.prf \
$(ZYNQ_QT_INSTALL)/lib/libQtGui.prl \
$(ZYNQ_QT_INSTALL)/lib/libQtNetwork.prl \
$(ZYNQ_QT_INSTALL)/lib/libQtCore.prl
$(QMAKE) -o Makefile sobel_qt.pro
$(ZYNQ_QT_INSTALL)/mkspecs/common/g++.conf:
$(ZYNQ_QT_INSTALL)/mkspecs/common/unix.conf:
$(ZYNQ_QT_INSTALL)/mkspecs/common/linux.conf:
$(ZYNQ_QT_INSTALL)/mkspecs/common/qws.conf:
$(ZYNQ_QT_INSTALL)/mkspecs/qconfig.pri:
$(ZYNQ_QT_INSTALL)/mkspecs/features/qt_functions.prf:
$(ZYNQ_QT_INSTALL)/mkspecs/features/qt_config.prf:
$(ZYNQ_QT_INSTALL)/mkspecs/features/exclusive_builds.prf:
$(ZYNQ_QT_INSTALL)/mkspecs/features/default_pre.prf:
$(ZYNQ_QT_INSTALL)/mkspecs/features/release.prf:
$(ZYNQ_QT_INSTALL)/mkspecs/features/default_post.prf:
$(ZYNQ_QT_INSTALL)/mkspecs/features/warn_on.prf:
$(ZYNQ_QT_INSTALL)/mkspecs/features/qt.prf:
$(ZYNQ_QT_INSTALL)/mkspecs/features/unix/thread.prf:
$(ZYNQ_QT_INSTALL)/mkspecs/features/moc.prf:
$(ZYNQ_QT_INSTALL)/mkspecs/features/resources.prf:
$(ZYNQ_QT_INSTALL)/mkspecs/features/uic.prf:
$(ZYNQ_QT_INSTALL)/mkspecs/features/yacc.prf:
$(ZYNQ_QT_INSTALL)/mkspecs/features/lex.prf:
$(ZYNQ_QT_INSTALL)/lib/libQtGui.prl:
$(ZYNQ_QT_INSTALL)/lib/libQtNetwork.prl:
$(ZYNQ_QT_INSTALL)/lib/libQtCore.prl:
qmake: FORCE
@$(QMAKE) -o Makefile sobel_qt.pro

dist:
@$(CHK_DIR_EXISTS) obj/sobel_qt1.0.0 || $(MKDIR) obj/sobel_qt1.0.0
$(COPY_FILE) --parents $(SOURCES) $(DIST) obj/sobel_qt1.0.0/ && $(COPY_FILE) --parents qt_app/mainwindow.h qt_app/cpustat.h qt_app/cpuplot.h qt_app/membwplot.h qt_app/ui_selector.h obj/sobel_qt1.0.0/ && $(COPY_FILE) --parents resourcefile.qrc obj/sobel_qt1.0.0/ && $(COPY_FILE) --parents qt_app/mainwindow.cpp qt_app/main.cpp qt_app/cpustat.cpp qt_app/cpuplot.cpp qt_app/membwplot.cpp obj/sobel_qt1.0.0/ && $(COPY_FILE) --parents ui/mainwindow.ui ui/mainwindow720.ui obj/sobel_qt1.0.0/ && (cd `dirname obj/sobel_qt1.0.0` && $(TAR) sobel_qt1.0.0.tar sobel_qt1.0.0 && $(COMPRESS) sobel_qt1.0.0.tar) && $(MOVE) `dirname obj/sobel_qt1.0.0`/sobel_qt1.0.0.tar.gz . && $(DEL_FILE) -r obj/sobel_qt1.0.0


clean:compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core


####### Sub-libraries

distclean: clean
-$(DEL_FILE) $(TARGET)
-$(DEL_FILE) Makefile


mkdirs:
$(MKDIR) moc obj

check: first

mocclean: compiler_moc_header_clean compiler_moc_source_clean

mocables: compiler_moc_header_make_all compiler_moc_source_make_all

compiler_moc_header_make_all: moc/moc_mainwindow.cpp moc/moc_cpuplot.cpp moc/moc_membwplot.cpp
compiler_moc_header_clean:
-$(DEL_FILE) moc/moc_mainwindow.cpp moc/moc_cpuplot.cpp moc/moc_membwplot.cpp
moc/moc_mainwindow.cpp: qt_app/ui_selector.h \
ui/ui_mainwindow.h \
qt_app/cpuplot.h \
qt_app/cpustat.h \
qt_app/membwplot.h \
ui/ui_mainwindow720.h \
qt_app/mainwindow.h
$(ZYNQ_QT_INSTALL)/bin/moc $(DEFINES) $(INCPATH) qt_app/mainwindow.h -o moc/moc_mainwindow.cpp

moc/moc_cpuplot.cpp: qt_app/cpustat.h \
qt_app/cpuplot.h
$(ZYNQ_QT_INSTALL)/bin/moc $(DEFINES) $(INCPATH) qt_app/cpuplot.h -o moc/moc_cpuplot.cpp

moc/moc_membwplot.cpp: qt_app/membwplot.h
$(ZYNQ_QT_INSTALL)/bin/moc $(DEFINES) $(INCPATH) qt_app/membwplot.h -o moc/moc_membwplot.cpp

compiler_rcc_make_all: qrc_resourcefile.cpp
compiler_rcc_clean:
-$(DEL_FILE) qrc_resourcefile.cpp
qrc_resourcefile.cpp: resourcefile.qrc \
images/ExternalVideo_Hardware_sobel.png \
images/TPG_Sobel_off.png \
images/ExternalVideo_Sobel_off.png \
images/TPG_Hardware_sobel.png \
images/ExternalVideo_software_sobel.png \
images/default.png \
images/TPG_software_sobel.png
$(ZYNQ_QT_INSTALL)/bin/rcc -name resourcefile resourcefile.qrc -o qrc_resourcefile.cpp

compiler_image_collection_make_all: ui/qmake_image_collection.cpp
compiler_image_collection_clean:
-$(DEL_FILE) ui/qmake_image_collection.cpp
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all: ui/ui_mainwindow.h ui/ui_mainwindow720.h
compiler_uic_clean:
-$(DEL_FILE) ui/ui_mainwindow.h ui/ui_mainwindow720.h
ui/ui_mainwindow.h: ui/mainwindow.ui \
qt_app/cpuplot.h \
qt_app/membwplot.h \
qt_app/cpustat.h
$(ZYNQ_QT_INSTALL)/bin/uic ui/mainwindow.ui -o ui/ui_mainwindow.h

ui/ui_mainwindow720.h: ui/mainwindow720.ui \
qt_app/cpuplot.h \
qt_app/membwplot.h \
qt_app/cpustat.h
$(ZYNQ_QT_INSTALL)/bin/uic ui/mainwindow720.ui -o ui/ui_mainwindow720.h

compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_moc_header_clean compiler_rcc_clean compiler_uic_clean

####### Compile

obj/mainwindow.o: qt_app/mainwindow.cpp qt_app/mainwindow.h \
qt_app/ui_selector.h \
ui/ui_mainwindow.h \
qt_app/cpuplot.h \
qt_app/cpustat.h \
qt_app/membwplot.h \
ui/ui_mainwindow720.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/mainwindow.o qt_app/mainwindow.cpp

obj/main.o: qt_app/main.cpp qt_app/mainwindow.h \
qt_app/ui_selector.h \
ui/ui_mainwindow.h \
qt_app/cpuplot.h \
qt_app/cpustat.h \
qt_app/membwplot.h \
ui/ui_mainwindow720.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/main.o qt_app/main.cpp

obj/cpustat.o: qt_app/cpustat.cpp qt_app/cpustat.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/cpustat.o qt_app/cpustat.cpp

obj/cpuplot.o: qt_app/cpuplot.cpp qt_app/cpuplot.h \
qt_app/cpustat.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/cpuplot.o qt_app/cpuplot.cpp

obj/membwplot.o: qt_app/membwplot.cpp qt_app/membwplot.h
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/membwplot.o qt_app/membwplot.cpp

obj/moc_mainwindow.o: moc/moc_mainwindow.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_mainwindow.o moc/moc_mainwindow.cpp

obj/moc_cpuplot.o: moc/moc_cpuplot.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_cpuplot.o moc/moc_cpuplot.cpp

obj/moc_membwplot.o: moc/moc_membwplot.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/moc_membwplot.o moc/moc_membwplot.cpp

obj/qrc_resourcefile.o: qrc_resourcefile.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o obj/qrc_resourcefile.o qrc_resourcefile.cpp

####### Install

install: FORCE

uninstall: FORCE

FORCE:

 

 

 

Am I specifying the correct ZYNQ_QT_INSTALL path. Because I have taken default path for installation(/Trolltech)

 

Thank you.

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
7,675 Views
Registered: ‎12-08-2011

I'm not sure why you edited the Makefile. You can set your local variable inside the Makefile to point to your Qt install dir simply by uncommenting the line and adding the path e.g.

 

ZYNQ_QT_INSTALL = /usr/local/Trolltech/Qt-4.7.3

 

or you set your environment variable before you even open SDK e.g. if you use bash you would run

 

export ZYNQ_QT_INSTALL=/usr/local/Trolltech/Qt-4.7.3

 

Not sure what you mean by "taking the default path of the Qt installation". Please follow the steps in the Qt/Qwt installation wiki to cross-compile the required libraries.

 

 

0 Kudos
Highlighted
Contributor
Contributor
7,663 Views
Registered: ‎04-16-2013

Hi, 

 

Thanks for replying. It was my mistake to edit makefile. Here is my console window which shows error please suggest.

 

«makefile: 115:warning:thecommandsforthetarget». c.o."overwritten".
«makefile: 112:warning:oldcommandsforthetarget». c.o."areignored.
«make: *no rule exists to the target».../Trolltech/Qt-4.7.3/mkspecs/qws/Linux-arm-gnueabi-g++/qmake.conf«

,

 

Thanks in advance.

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
7,650 Views
Registered: ‎12-08-2011

have you opened the file ".../Trolltech/Qt-4.7.3/mkspecs/qws/Linux-arm-gnueabi-g++/qmake.conf" and looked inside? Does it exist at all? I'm not sure if you're pointing to the right install directory. Have you cross-compiled the Qt/Qwt libraries as described on the wiki page? Have you run into any errors during that process?

0 Kudos
Highlighted
Contributor
Contributor
7,646 Views
Registered: ‎04-16-2013

Hi ,

 

Yes, the ".../Trolltech/Qt-4.7.3/mkspecs/qws/Linux-arm-gnueabi-g++/qmake.conf", path do exist. 

 

And I have followed all the steps untill mounting of the image.

 

My suspecsion is that my qmake is not installed properly or not installed only, because in my mkspecs/bin , there is no qmake. 

 

 

PS : I haven't specified specific CPU architecture while configuring Qt. Is this the reson for problem.

 

Thankyou.

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
4,615 Views
Registered: ‎12-08-2011

qmake is not inside the $ZYNQ_QT_INSTALL/mkspecs/bin dir but under $ZYNQ_QT_INSTALL/bin, hence you are asked to run this command (see Qt/Qwt build instructions):

 

export PATH=$ZYNQ_QT_INSTALL/bin:$PATH

 

the following command

 

which qmake

should point you to your qmake binary location if you have set your PATH variable correctly.

 

You have to specify '-embedded arm -xplatform qws/linux-arm-gnueabi-g++' when running the configure command since you want to cross-compile the libraries for ARM. Please follow the exact steps on the wiki.

 

0 Kudos
Highlighted
Contributor
Contributor
4,594 Views
Registered: ‎04-16-2013

Hi,

 

On executing commands provided by you showed -----

 

/usr/local/Trolltech/QtEmbedded-4.7.3-arm/bin/qmake

 

And I changed in the make file this path to environment variable(Makefile attached) 

 

But following error :(

 

 

18:24:25 * Incremental build of configuration default for project sobel_qt.

 

make-f make file all

 

«Makefile: 112: warning: the commands for the target». c.o. "overwritten".

 

«Makefile: 109: warning: old commands for the target». c.o. "are ignored.

 

«make: * no rule exists, to the target» / mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf«,
 
I followed all the steps from wiki and there were no errors in the process....
 
Unable to figure out no rule exists, to the target» / mkspecs/qws/linux-arm-gnueabi-g++/qmake.conf«, this.

 

0 Kudos
Highlighted
Contributor
Contributor
4,573 Views
Registered: ‎04-16-2013

Hello,

 

Any suggestions for the above post???

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
4,567 Views
Registered: ‎12-08-2011

Did you copy over the provided qmake.conf?

Does it exist at the path where it is expected?

Please try and compile the project from within XSDK as shown in the wiki tutorial.

I still think you're missing a step in the build process / your environment setup.

 

 

0 Kudos
Highlighted
Contributor
Contributor
4,548 Views
Registered: ‎04-16-2013

Hello, 

 

I have re-build all the Qt/Qwt libraries but not that fruitful!. Well, in my Makefile(which is auto generated) the Qt library path is taken and CROSS_COMPILE variable is also set.

 

Now, is there any extra settings required in the SDK? 

 

Should I try including/refering to the libraries? Somehow I am unable to get rid of Undefined ref error for all qt headers.

 

Thanks for help , hope u could suggest me something at this last stage...

 

 

 

0 Kudos