Results 1 to 7 of 7

Thread: Qbs

  1. #1
    Join Date
    Apr 2009
    Posts
    206
    Thanks
    34
    Thanked 2 Times in 2 Posts

    Default Qbs

    Hello friends,

    besides the fact that the module number are grown, my confusion has grown too. Is the qbs module part of qt540 or should I install it alone....???

    Thanks in advance

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,546 Times in 1,496 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qbs

    QBS is not a module, it is a build system, like qmake+make.

    I doubt it has replaced qmake already.

    Cheers,
    _

  3. #3
    Join Date
    Apr 2009
    Posts
    206
    Thanks
    34
    Thanked 2 Times in 2 Posts

    Default Re: Qbs

    The reason why I ask this question is in resulting error in using

    Depends { name: "Qt.core" }
    this line in qbs file:
    C:\....\testl.qbs:59: Fehler: Module Qt/core could not be loaded.
    And I ask me if I should update the qbs or not. And is it build in or not etc.

  4. #4
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,546 Times in 1,496 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qbs

    Resulting from what?

    Cheers,
    _

  5. #5
    Join Date
    Apr 2009
    Posts
    206
    Thanks
    34
    Thanked 2 Times in 2 Posts

    Default Re: Qbs

    I try to convert my trivial qmlplugin from pro to qbs style:

    so my pro is this:
    Qt Code:
    1. TEMPLATE = lib
    2. CONFIG += plugin
    3.  
    4. TARGET = QTestPlugin
    5.  
    6.  
    7. DESTDIR = ../QTestPlugin
    8.  
    9.  
    10.  
    11.  
    12. QT += quick qml concurrent axcontainer
    13. CONFIG += c++11
    14. CONFIG += precompile_header
    15.  
    16. MOC_DIR = ./mocs
    17.  
    18. PRECOMPILED_HEADER = StdAfx.h
    19. PRECOMPILED_SOURCE = StdAfx.cpp
    20. QMAKE_CXXFLAGS = /DNOMINMAX
    21. QMAKE_CFLAGS = /Zc:wchar_t
    22.  
    23.  
    24. QMAKE_LFLAGS_RELEASE+=/MAP
    25. QMAKE_CFLAGS_RELEASE += /Zi
    26. QMAKE_CFLAGS_DEBUG += /FS
    27. QMAKE_LFLAGS_RELEASE +=/DEBUG /OPT:REF /INCREMENTAL:NO /OPT:ICF
    28.  
    29. QMAKE_CXXFLAGS += /FAcs #codfiles
    30. QMAKE_CXXFLAGS += /FS
    31. QMAKE_LFLAGS += /mapinfo:exports
    32.  
    33.  
    34. win32:INCLUDEPATH += . \
    35. $(CPP_LIB)"64" \
    36. $(CPP_INCLUDE) \
    37. $(CPP_INCLUDE)"\\WTL"
    38.  
    39. SOURCES += QTest.cpp \
    40. StdAfx.cpp
    41.  
    42. HEADERS += QTest.h \
    43. plugin.h \
    44. ..\MDTools.h \
    45. StdAfx.h
    46.  
    47.  
    48. include(QTestClass.pri)
    49.  
    50.  
    51.  
    52. DESTPATH=$$[PWD]/../QTestPlugin
    53.  
    54. target.path = $$DESTDIR/QTestPlugin
    55. qmldir.files = QTestPlugin/qmldir
    56. qmldir.path = $$DESTPATH
    57.  
    58. INSTALLS += qmldir target
    59.  
    60.  
    61. QMAKE_POST_LINK = $$PWD/copyPlugin.bat
    To copy to clipboard, switch view to plain text mode 

    So compiling this project is no problem:

    And this is my attempt to convert it to qbs:

    Qt Code:
    1. import qbs 1.0
    2.  
    3. Product {
    4. Depends { name: "cpp" }
    5.  
    6. property string cpp_include: qbs.getEnv("CPP_INCLUDE");
    7. property string cpp_lib: qbs.getEnv("CPP_LIB");
    8. property string vc_include: "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\include"
    9. property string vc_lib: "C:\\Program Files (x86)\\Microsoft Visual Studio 12.0\\VC\\lib"
    10.  
    11. name: "QTestPlugin"
    12. type: "dynamiclibrary"
    13. destinationDirectory: "../QTestPlugin"
    14.  
    15.  
    16. cpp.includePaths: [
    17. '.',
    18. cpp_lib+'64',
    19. cpp_include,
    20. cpp_include+'\\WTL',
    21. vc_include,
    22. vc_lib
    23. ]
    24.  
    25. cpp.precompiledHeader: "StdAfx.h"
    26. //cpp.cxxLanguageVersion: "c++11"
    27. cpp.cppFlags: "-std=c++11"
    28. cpp.windowsApiCharacterSet : "unicode"
    29. //cpp.warningLevel: "all"
    30.  
    31.  
    32. files: [
    33. "QTest.cpp",
    34. "QTest.h",
    35. "StdAfx.h",
    36. "StdAfx.cpp",
    37. "../MDTools.h"
    38. ]
    39.  
    40.  
    41.  
    42. //Depends { name: "Qt"; submodules: ["quick", "qml", "concurrent", "axcontainer"] }
    43.  
    44. //Depends { name: "Qt.core" }
    45.  
    46.  
    47.  
    48. Group {
    49. name: "QTestClass"
    50. prefix: "../Includes/"
    51. files: [
    52. "QTestClass.cpp",
    53. "QTestClass.h"
    54. ]
    55. }
    56. }
    To copy to clipboard, switch view to plain text mode 

    So I try it to rebuild:

    Qt Code:
    1. 16:06:58: Führe Schritte für Projekt QTestControl aus...
    2. precompiling StdAfx.h (c)
    3. C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\Bin/cl.exe /nologo /c /EHsc /O2 /MD /IC:\ProjectPath\QTestControl /ID:\dev60\projects\lib64
    4. /ID:\dev60\projects\include /ID:\dev60\projects\include\WTL "/IC:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include"
    5. "/IC:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib" /DNDEBUG /DUNICODE /D_UNICODE /FoC:\ProjectPath\QTestControl\qtc_Desktop-release\QTestControlPlugin.qtc_Desktop\.obj\StdAfx_c.obj
    6. C:\ProjectPath\QTestControl\StdAfx.h /TC /Yc /FpC:\ProjectPath\QTestControl\qtc_Desktop-release\QTestControlPlugin.qtc_Desktop\.obj\QTestControlPlugin_c.pch
    7. /FoC:\ProjectPath\QTestControl\qtc_Desktop-release\QTestControlPlugin.qtc_Desktop\.obj\StdAfx_c.obj C:\ProjectPath\QTestControl\StdAfx.h
    8. C:\ProjectPath\QTestControl\StdAfx.h(13) : warning C4005: '_UNICODE' : macro redefinition
    9. command-line arguments : see previous definition of '_UNICODE'
    10. c:\program files\microsoft sdks\windows\v7.0\include\sal_supp.h(57) : warning C4005: '__useHeader' : macro redefinition
    11. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\sal.h(2886) : see previous definition of '__useHeader'
    12. c:\program files\microsoft sdks\windows\v7.0\include\specstrings_supp.h(77) : warning C4005: '__on_failure' : macro redefinition
    13. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\sal.h(2896) : see previous definition of '__on_failure'
    14. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(74) : error C2061: syntax error : identifier '_com_error'
    15. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(74) : error C2059: syntax error : ';'
    16. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(84) : error C2061: syntax error : identifier '_bstr_t'
    17. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(84) : error C2059: syntax error : ';'
    18. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(85) : error C2061: syntax error : identifier '_variant_t'
    19. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(85) : error C2059: syntax error : ';'
    20. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(93) : error C2061: syntax error : identifier '_com_util'
    21. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(93) : error C2059: syntax error : ';'
    22. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(93) : error C2449: found '{' at file scope (missing function header?)
    23. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(120) : error C2059: syntax error : '}'
    24. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(144) : error C2061: syntax error : identifier '_bstr_t'
    25. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(144) : error C2059: syntax error : ';'
    26. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(144) : error C2449: found '{' at file scope (missing function header?)
    27. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(285) : error C2059: syntax error : '}'
    28. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(302) : error C2061: syntax error : identifier '_bstr_t'
    29. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(302) : error C2059: syntax error : ';'
    30. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(302) : error C2059: syntax error : ':'
    31. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(310) : error C2061: syntax error : identifier '_bstr_t'
    32. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(310) : error C2059: syntax error : ';'
    33. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(310) : error C2059: syntax error : ':'
    34. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(320) : error C2061: syntax error : identifier '_bstr_t'
    35. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(320) : error C2059: syntax error : ';'
    36. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(320) : error C2059: syntax error : ':'
    37. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(331) : error C2061: syntax error : identifier '_bstr_t'
    38. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(331) : error C2059: syntax error : ';'
    39. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(331) : error C2059: syntax error : ':'
    40. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(341) : error C2061: syntax error : identifier '_bstr_t'
    41. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(341) : error C2059: syntax error : ';'
    42. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(341) : error C2059: syntax error : ':'
    43. C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\comutil.h(354) : error C2061: syntax error : identifier '_bstr_t'
    To copy to clipboard, switch view to plain text mode 


    When I uncomment the
    Qt Code:
    1. Depends { name: "Qt"; submodules: ["quick", "qml", "concurrent", "axcontainer"] }
    To copy to clipboard, switch view to plain text mode 
    line it make an error : Error: Module Qt/quick could not be loaded. etc..


    All in all a very confusing step to convert old running porper projects to qbs.

    Any advice???

  6. #6
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,419
    Thanks
    37
    Thanked 1,546 Times in 1,496 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Qbs

    I can't find the error you are claiming in the error output you've posted.
    Which line is it at?

    Any specific reason you already started experimenting with QBS?
    qmake no longer suiting your needs?

    Cheers,
    _

  7. #7
    Join Date
    Apr 2009
    Posts
    206
    Thanks
    34
    Thanked 2 Times in 2 Posts

    Default Re: Qbs

    There is total all incorrect.
    Starting qt modules which are not found.Up to supporting Com type (_bstr_t,_variant_t, etc). The specific error message does not appear, cause I have commented out this line and try to compile it, which produce the result mentioned above.

    For sure pro files suites my needs, but I try to learn qbs which perhaps replaces qmake in future!

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.