FreeBSD > Compiling application with QT

Posted on in Categories News last updated January 25, 2005

Qt is a complete C++ application framework (toolkit), including a class library and tools for cross-platform. While compile qt application under FreeBSD you get error:

/bin/uic about.ui -o about.h
/bin/uic:No such file or directory
*** Error code 1

Stop in /home/projects/nqe.

To get rid of this problem:
1) To compile application under QT define QTDIR variable (assuming you are using bash shell)
$ export QTDIR=/usr/X11R6

You can add this line to your startup shell script i.e. ~/.bash_profile

2) Compile your qt application:
$ cd /path/to/appdir
$ qmake -project
$ qmake
$ make

3) Execute your code.

Posted by: Vivek Gite

The author is the creator of nixCraft and a seasoned sysadmin and a trainer for the Linux operating system/Unix shell scripting. He has worked with global clients and in various industries, including IT, education, defense and space research, and the nonprofit sector. Follow him on Twitter, Facebook, Google+.

Leave a Comment