[Previous] [Next] [Contents]

CHAPTER 3. Hello World

 

3.3 BUILD

Following steps are necessary to compile and run 'hello world' on the Linux desktop:

  • Set environment variables as followings:
  • # export QTDIR=/opt/host/i386/qtx
    # export TMAKEPATH=/usr/lib/tmake/lib/mizi/x86

     

  • Write sample source code, 'hello world'.

  • Note) We already wrote 'hello world' in "3.2 Write Hello World".

  • Write project file (hello.pro) as given as below :
  • TEMPLATE = app
    CONFIG += qt warn_on release
    HEADERS =
    SOURCES = hello.cpp
    TARGET = hello
    REQUIRES=

     

  • Write desktop file (hello.desktop) as given as below :
  • [Desktop Entry]
    Exec = hello <Execution file name>
    Icon = hello <Icon name>
    Name = hello <Application name>
    Type = Application <Application category>

     

  • Generate a Makefile :
  • # tmake hello.pro -o Makefile

     

  • Build the sample :
  • # make

     

  • Install it :
  • # cp hello $HOME/Linuette/bin
    # cp hello.desktop $HOME/Linuette/desktop/<application's category name>
    # cp hello.png $HOME/Linuette/pixmap

     


    [Previous] [Next] [Contents] MIZI Prizm 2.0.0