Results 1 to 6 of 6

Thread: Does qmake support out of source builds?

  1. #1
    Join Date
    Apr 2008
    Location
    Pittsburgh,PA,USA
    Posts
    48
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Does qmake support out of source builds?

    I would like to build qwt out of source so that I can have 1 source and build it for 32 bit and 64 bit for Visual Studio 2005 and Visual Studio 2008 similar to what I do will all of my cmake based libraries so that I can easily integrate qwt into my build process and folder structure. Is there an easy way to get out of source builds with QMake? I have looked at the qmake documentation and I have done some google searching but I can't find what I want.
    John

  2. #2
    Join Date
    Jan 2006
    Location
    Belgium
    Posts
    1,938
    Thanked 268 Times in 268 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Wiki edits
    20

    Default Re: Does qmake support out of source builds?

    Just run qmake in the build directory like you do with cmake

  3. #3
    Join Date
    Apr 2008
    Location
    Pittsburgh,PA,USA
    Posts
    48
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Does qmake support out of source builds?

    Thanks. I will have to experiment with that. The reason is I am using windows and visual studio. On the first project I tested (qwt) I got a path too long error. Darn windows not supporting long paths..

    Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
    Copyright (C) Microsoft Corporation. All rights reserved.

    "c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe" -f Makefile.Release

    Microsoft (R) Program Maintenance Utility Version 9.00.30729.01
    Copyright (C) Microsoft Corporation. All rights reserved.

    NMAKE : fatal error U1095: expanded command line 'echo compiling x:\QMakeBased\Libraries\qwt-5.2.1\s
    rc\qwt_abstract_scale_draw.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_color_map.cpp x:\QMakeBased
    \Libraries\qwt-5.2.1\src\qwt_clipper.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_double_interval.c
    pp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_double_rect.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\q
    wt_dyngrid_layout.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_layout_metrics.cpp x:\QMakeBased\Lib
    raries\qwt-5.2.1\src\qwt_math.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_magnifier.cpp x:\QMakeBa
    sed\Libraries\qwt-5.2.1\src\qwt_paint_buffer.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_panner.cp
    p x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_painter.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_pi
    cker.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_round_scale_draw.cpp x:\QMakeBased\Libraries\qwt-
    5.2.1\src\qwt_scale_div.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_scale_draw.cpp x:\QMakeBased\L
    ibraries\qwt-5.2.1\src\qwt_scale_map.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_spline.cpp x:\QMa
    keBased\Libraries\qwt-5.2.1\src\qwt_text_engine.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_text_l
    abel.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_text.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qw
    t_event_pattern.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_picker_machine.cpp x:\QMakeBased\Libra
    ries\qwt-5.2.1\src\qwt_scale_engine.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_symbol.cpp x:\QMak
    eBased\Libraries\qwt-5.2.1\src\qwt_curve_fitter.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_data.c
    pp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_interval_data.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src
    \qwt_legend.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_legend_item.cpp x:\QMakeBased\Libraries\qw
    t-5.2.1\src\qwt_plot.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_print.cpp x:\QMakeBased\Libr
    aries\qwt-5.2.1\src\qwt_plot_xml.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_axis.cpp x:\QMak
    eBased\Libraries\qwt-5.2.1\src\qwt_plot_curve.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_dic
    t.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_grid.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\
    qwt_plot_item.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_spectrogram.cpp x:\QMakeBased\Libra
    ries\qwt-5.2.1\src\qwt_plot_scaleitem.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_marker.cpp
    x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_layout.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_
    plot_printfilter.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_rasteritem.cpp x:\QMakeBased\Lib
    raries\qwt-5.2.1\src\qwt_plot_canvas.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_rescaler.cpp
    x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_panner.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt
    _plot_picker.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_plot_zoomer.cpp x:\QMakeBased\Libraries\q
    wt-5.2.1\src\qwt_plot_magnifier.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_raster_data.cpp x:\QMa
    keBased\Libraries\qwt-5.2.1\src\qwt_scale_widget.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_abstr
    act_slider.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_abstract_scale.cpp x:\QMakeBased\Libraries\
    qwt-5.2.1\src\qwt_arrow_button.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_analog_clock.cpp x:\QMa
    keBased\Libraries\qwt-5.2.1\src\qwt_compass.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_compass_ro
    se.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_counter.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\q
    wt_dial.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_dial_needle.cpp x:\QMakeBased\Libraries\qwt-5.
    2.1\src\qwt_double_range.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_knob.cpp x:\QMakeBased\Librar
    ies\qwt-5.2.1\src\qwt_slider.cpp x:\QMakeBased\Libraries\qwt-5.2.1\src\qwt_thermo.cpp x:\QMakeBased\
    Libraries\qwt-5.2.1\src\qwt_wheel.cpp && cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -MD -W3 -w34100 -w34
    189 -GR -EHsc -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DQT_DLL -DQWT_DLL -DQWT_MAKEDLL -DQT_THREAD_
    SUPPORT -DQT_DLL -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -I"..\..\..\Libraries\Qt-4.6.2\include\QtC
    ore" -I"..\..\..\Libraries\Qt-4.6.2\include\QtGui" -I"..\..\..\Libraries\Qt-4.6.2\include" -I"..\..\
    ..\Libraries\Qt-4.6.2\include\ActiveQt" -I"moc" -I"x:\QMakeBased\Libraries\qwt-5.2.1\src" -I"." -I".
    .\..\..\Libraries\Qt-4.6.2\mkspecs\default" -Foobj\ @C:\Temp\nm8CB3.tmp' too long
    Stop.
    NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\BIN\nmake.exe"' :
    return code '0x2'
    Stop.
    NMAKE : fatal error U1077: 'cd' : return code '0x2'
    Stop.
    John

  4. #4
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Does qmake support out of source builds?

    Did you have proper environment / PATH set ?
    Try opening the visual studio command prompt and then trying compiling..

  5. #5
    Join Date
    Apr 2008
    Location
    Pittsburgh,PA,USA
    Posts
    48
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Does qmake support out of source builds?

    This was from a proper Visual Studio 2008 32 bit command prompt.
    John

  6. #6
    Join Date
    Apr 2008
    Location
    Pittsburgh,PA,USA
    Posts
    48
    Thanks
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Does qmake support out of source builds?

    Okay. I tested and it appears to work if I shorten the path by substituting the long path with a drive letter.

    subst k: x:\QMakeBased\Libraries\qwt-5.2.1

    then

    x:\32Bit\VC.90\Temp\Qwt-5.2.1>qmake -r k:\qwt.pro

    then build and install..

    Maybe I should bug microsoft for the reason why in 2010 we have a maximum command line length of 8K (or 8000?) in windows 7 64 bit.

    But I guess that is a tremendous improvement over the past:
    http://msdn.microsoft.com/en-us/libr...st(VS.80).aspx
    John

Similar Threads

  1. Replies: 7
    Last Post: 30th May 2011, 09:34
  2. QMake and GIF Support
    By sheeeng in forum Installation and Deployment
    Replies: 16
    Last Post: 28th July 2009, 10:49
  3. qmake using source files not in .pro file
    By Asperamanca in forum Newbie
    Replies: 12
    Last Post: 9th July 2009, 15:29
  4. Qt/Windows Open Source Edition to support VS Express
    By pdolbey in forum Installation and Deployment
    Replies: 3
    Last Post: 23rd September 2007, 14:32
  5. 4.1.4 built from source, qmake fails with Hello World
    By Mookie in forum Installation and Deployment
    Replies: 6
    Last Post: 27th June 2006, 23:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.