One *simple* Release build of fetchmore



  • That's all I ask. No "where's mingwm10.dll," "where's libgcc_s_dw2-1.dll," "can't entry point _Z9qBadAllocv."

    How did the downloaded fetchmore.exe ever get built in the first place? I still can't duplicate a build on my own machine so that I can work from there. If it's going to be so much trouble to do this in Windows, how would the code ever conceivably be ported to something else?

    How do you build this?



  • if you link all statically, you need no additional dlls



  • Gerolf, thank you very much for responding. I don't know how to link statically with Qt Creator. Can you, or someone else, please show me how?



  • In the wiki,
    there is an article regarding Qt and "static linking:":http://developer.qt.nokia.com/wiki/How_to_build_a_static_Qt_version_for_Windows_with_gcc



  • Thank you. I'll read it after I get back from a meeting coming up shortly. I much appreciate your help.



  • Don't grow too much the program, linking statically ?



  • yes and no,

    if you link statically, you needn't deliver the libraries which are not small (look at QtCore, QtGui, etc.) But your executable grows, that's correct.

    You have to think, which one is better. And you have to think, what is allowed for which license. I think, there were some restrictions with LGPL...



  • Still, I would not call building statically the "simple" solution...



  • But if you don't want to distribute dlls with your exe, what else to do?



  • I gathered the TS had problems getting an app to work on his own system. Not that he had huge problems with distributing .dll files as such.



  • But his questions sound like he just wants to take his exe and put it somewhere to run it, right?

    bq. How did the downloaded fetchmore.exe ever get built in the first place? I still can’t duplicate a build on my own machine so that I can work from there. If it’s going to be so much trouble to do this in Windows, how would the code ever conceivably be ported to something else?



  • Perhaps you are right, and I misunderstood.



  • Regarding the distribution question, I think that considering the quality level that can be reached with software developed with a platform like Qt-Creator, is not a bad think consider also a good setup to distribute the application and don't simply deliver a exe file.

    Regarding the license, it's true, but after reading and reading and reading ... all the options for licensing the software, I decided that the LGPL license is probably the best solution because you can delivery already LGPL licensed libraries, your software and yours of third party components with this license or not.

    I agree with Andre, building statically is not the simple solution. For those that are on the market by a sufficient number of year, I hope they remember what great wonderful revolution was when dynamic libraries was introduced in the development world.

    What I meant with the fact that the code grows, was not only a mere problem of dimensions, but also of how the program work, I think that the performances slows with big programs respect to a package.

    Concluding, I am experiencing a problem delivering applications developed with Qt for desktop. Is there the right way to find exactly ALL the components needed to deliver a program with libraries ?



  • Hi,

    I also prefer using the libraries, you only need to deliver them once for many binaries.
    But to find all needed libraries? On windows I suggest using DependencyViewer. That's what I do.



  • Gerolf,

    my problem is there. I use DependencyViewer too, but there is a case that I continue to have a problem with (seems silly, but is still unresolved) jpeg images...



  • If you us eplug-ins, it's something you must know. These are loaded during runtime with LoadLibrary, which is not found be dependencyViewer, sorry. This is something, that's up to you and I klnow no tool, that helps with it :-(



  • Thank you very much for this advice. Now, the question is forked ;)

    1. How I know if I - unconsciouscly use the eplug-ins? I was sure the there was "something" I was using in develop mode and I missed when was in the application...

    2. Why e-plugins are note clearly evidentiated ? It's an obvious thing that I miss for ignorance or what ?

    Thank again.


  • Moderators

    Please note that static linking has implications on the licensing of your software.

    LGPL does AFAIK require dynamic linking to be applicable. So by linking statically against a non-commercial Qt you will need to use the GPL licensing option if I understood the licenses correctly, which will then apply to your code as well. I am not a lawyer though.



  • I agree, this is a confirmation on what I told in a previous post.

    I user LGPL due for two important things: can be delivered with public and non-public components / libraries and is possible to create LPGL and Proprietary licenses at the same time. So, considering that - this is my point of view - dynamic linking is more flexible than static - I agree this licensing method.



  • In principle, I think you could use static linking under LGPL if you provide a means to link against a new/modified version of the libs. That is possible, if you provide the object files. Opinions on this matter differ though, and I don't know of any court rulings on the matter.



  • Andre, thank you, this is new for me. I am not a lawyer, but for other reasons me and my wife read a lot about open-source, copyleft and open licensing.
    I never though to include object for future re-linking of updates in all-in-one application. But this means almost to include also the essential for the compiler / linker. And what about when the versions of the compiler / linker are updated ? This method seems to complicate the things...



  • The compile output follows, and I don't know what "command failed with exit code 1 [and 2]" means. Thank you for any assistance that you can provide:

    @Running build steps for project fetchmore...
    Configuration unchanged, skipping qmake step.
    Starting: "C:\QtSDK\QtCreator\bin\jom.exe"
    C:\QtSDK\QtCreator\bin\jom.exe -nologo -j 4 -f Makefile.Release all
    cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -Og -GL -MD -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DSTATIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"......\include\QtCore" -I"......\include\QtGui" -I"......\include" -I"......\include\ActiveQt" -I"tmp\moc\release_shared" -I"..\fetchmore" -I"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE" -I"c:\Program Files\Microsoft SDKs\Windows\v6.0A\include" -I"." -I"c:\qt_static\2010.05\qt\mkspecs\win32-msvc2008" -Fotmp\obj\release_shared\ @C:\Users\Admin\AppData\Local\Temp\filelistmodel.obj.5572.63.jom
    filelistmodel.cpp

    jom 1.0.3 - empower your cores

    cl : Command line warning D9035 : option 'Og' has been deprecated and will be removed in a future release
    cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -Og -GL -MD -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DSTATIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"......\include\QtCore" -I"......\include\QtGui" -I"......\include" -I"......\include\ActiveQt" -I"tmp\moc\release_shared" -I"..\fetchmore" -I"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE" -I"c:\Program Files\Microsoft SDKs\Windows\v6.0A\include" -I"." -I"c:\qt_static\2010.05\qt\mkspecs\win32-msvc2008" -Fotmp\obj\release_shared\ @C:\Users\Admin\AppData\Local\Temp\main.obj.5572.94.jom
    main.cpp
    cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -Og -GL -MD -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DSTATIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"......\include\QtCore" -I"......\include\QtGui" -I"......\include" -I"......\include\ActiveQt" -I"tmp\moc\release_shared" -I"..\fetchmore" -I"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE" -I"c:\Program Files\Microsoft SDKs\Windows\v6.0A\include" -I"." -I"c:\qt_static\2010.05\qt\mkspecs\win32-msvc2008" -Fotmp\obj\release_shared\ @C:\Users\Admin\AppData\Local\Temp\moc_filelistmodel.obj.5572.702.jom
    moc_filelistmodel.cpp
    cl : Command line warning D9035 : option 'Og' has been deprecated and will be removed in a future release
    cl : Command line warning D9035 : option 'Og' has been deprecated and will be removed in a future release
    cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -Og -GL -MD -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DSTATIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"......\include\QtCore" -I"......\include\QtGui" -I"......\include" -I"......\include\ActiveQt" -I"tmp\moc\release_shared" -I"..\fetchmore" -I"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE" -I"c:\Program Files\Microsoft SDKs\Windows\v6.0A\include" -I"." -I"c:\qt_static\2010.05\qt\mkspecs\win32-msvc2008" -Fotmp\obj\release_shared\ @C:\Users\Admin\AppData\Local\Temp\moc_window.obj.5572.734.jom
    moc_window.cpp
    C:\Qt\2010.05\qt\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DSTATIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"......\include\QtCore" -I"......\include\QtGui" -I"......\include" -I"......\include\ActiveQt" -I"tmp\moc\release_shared" -I"..\fetchmore" -I"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE" -I"c:\Program Files\Microsoft SDKs\Windows\v6.0A\include" -I"." -I"c:\qt_static\2010.05\qt\mkspecs\win32-msvc2008" -D_MSC_VER=1500 -DWIN32 ..\fetchmore\filelistmodel.h -o tmp\moc\release_shared\moc_filelistmodel.cpp
    C:\Qt\2010.05\qt\bin\moc.exe -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DSTATIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"......\include\QtCore" -I"......\include\QtGui" -I"......\include" -I"......\include\ActiveQt" -I"tmp\moc\release_shared" -I"..\fetchmore" -I"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE" -I"c:\Program Files\Microsoft SDKs\Windows\v6.0A\include" -I"." -I"c:\qt_static\2010.05\qt\mkspecs\win32-msvc2008" -D_MSC_VER=1500 -DWIN32 ..\fetchmore\window.h -o tmp\moc\release_shared\moc_window.cpp
    cl -c -nologo -Zm200 -Zc:wchar_t- -O2 -Og -GL -MD -GR -EHsc -W3 -w34100 -w34189 -DUNICODE -DWIN32 -DQT_LARGEFILE_SUPPORT -DSTATIC -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_THREAD_SUPPORT -I"......\include\QtCore" -I"......\include\QtGui" -I"......\include" -I"......\include\ActiveQt" -I"tmp\moc\release_shared" -I"..\fetchmore" -I"c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\INCLUDE" -I"c:\Program Files\Microsoft SDKs\Windows\v6.0A\include" -I"." -I"c:\qt_static\2010.05\qt\mkspecs\win32-msvc2008" -Fotmp\obj\release_shared\ @C:\Users\Admin\AppData\Local\Temp\window.obj.5572.125.jom
    window.cpp
    cl : Command line warning D9035 : option 'Og' has been deprecated and will be removed in a future release
    cl : Command line warning D9035 : option 'Og' has been deprecated and will be removed in a future release
    /OUT:release\fetchmores.exe @C:\Users\Admin\AppData\Local\Temp\fetchmores.exe.5572.1732.jom
    The system cannot find the path specified.
    command failed with exit code 1
    command failed with exit code 2
    The process "C:\QtSDK\QtCreator\bin\jom.exe" exited with code 2.
    Error while building project fetchmore (target: Desktop)
    When executing build step 'Make'@

    And would it be normal for this routine to add an 's' to fetchmore before the '.exe' like it did on "/OUT:release\fetchmores.exe @C:\Users\Admin\AppData\Local\Temp\fetchmores.exe.5572.1732.jom"?



  • ec31, try to mark ad "code" the lines of the post that are from the compiler, it became readable and clear.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.