Qt dependencies for Windows 10



  • Thank you, I installed Qt 5.9.3, but I keep having the same problem both in VS2015 and VS2017. I think I will have to reinstall Windows and see if the problem goes away.



  • Let's try without such drastic actions.



  • Have you tried to clean your projects in MS VS? The error you have, I think, is caused by a mix of Qt versions. For example, you compiled a SAMSON Element with Qt whose version is not 5.9.3, or when you launch SAMSON a version of Qt libraries different from 5.9.3 is used. Please, check your environment variables and project settings in MS VS.

    Just for information. For Windows, SAMSON is compiled on Win7 with MS VS 2015 64bit and Qt 5.9.3. Personally, I am using Win10 with MS VS 2017 64bit (currently, my Windows SDK Version is 10.0.17134.0) and Qt 5.9.3.



  • How do you create a SAMSON Element project for VS? You can check a tutorial on building a SAMSON Element on Windows for some commands.
    In a build folder of your SAMSON Element:

    for Visual Studio 2015:

    cmake -DSAMSON_SDK_PATH=”C:\Program Files\NANO-D\SDK\0.7.0” -G”Visual Studio 14 Win64” -DQT5_CMAKE_INCLUDE_DIR=”C:\Qt\5.9.3\msvc2015_64\lib\cmake” ..
    

    for Visual Studio 2017:

    cmake -DSAMSON_SDK_PATH=”C:\Program Files\NANO-D\SDK\0.7.0” -G”Visual Studio 15 Win64” -DQT5_CMAKE_INCLUDE_DIR=”C:\Qt\5.9.3\msvc2017_64\lib\cmake” ..
    

    Actually, providing of QT5_CMAKE_INCLUDE_DIR might not be necessary if you have it specified in your environment variables.

    So, you may check the QT5_CMAKE_INCLUDE_DIR environment variable.



  • Please, check as well Path environment variables in user and system environment variables.

    For me:
    In the Path system variable I have C:\Qt\5.9.3\msvc2017_64\bin set as a first path.
    In the Path user variable I have the following paths set: C:\Users\marin\Anaconda3;C:\Users\marin\Anaconda3\Library\mingw-w64\bin;C:\Users\marin\Anaconda3\Library\usr\bin;C:\Users\marin\Anaconda3\Library\bin;C:\Users\marin\Anaconda3\Scripts;C:\Program Files\CMake\bin;C:\Qt\5.9.3\msvc2017_64\lib. The paths for Anaconda3 were set automatically by Anaconda.



  • You may also try to uninstall SAMSON Elements (both installed from samson-connect.net and developed locally) and check if the error is still there.



  • Hi! Somehow it got fixed, I can't say for sure what fixed it, as I removed several modules, but it is now working again and my module loads in debug. I will pay attention if it happens again, because there is a high chance it was caused by a module :) Thanks for your help!!



  • You may try adding modules one-by-one to see which one caused it. Was it one from samson-connect.net?



  • I will try, I don't think it was one from SAMSON connect, as most of them I had them for long. I think probably it was due to several things, maybe when re-installing all the programming environment again, some new things had a conflict with modules. It was really weird, and as I said my colleague has almost an identical installation (we went through it together) and also several modules installed and he didn't have the problem.



  • Hi!

    Another colleague had the same problem. I still don't know what caused it, but it went away after uninstalling all modules related to minimization and simulations (we uninstalled them in a batch, so I don't know which one could cause it, or if it was due to an interaction between our custom module and one of these, and therefore it could be our fault).

    Best regards,

    Elisa



  • Did you have them installed before? Did you install them again after?



  • I had them installed for a long time, so it was either an update in any of those modules, or a bug I introduced that somehow conflicts with them.

    I haven't install them after this, but once our module is ready for release I will definitely check this issue again (as I was playing with Anaconda3, and putting it on the path also affects Qt, there is a chance it was related to this).



  • I suspect it might be related more to Anaconda3 affecting Qt, since Anaconda also ships Qt libraries.
    If you suspect that it is due to SAMSON modules, could you, please, put a list of those you are suspecting causing the problem.



  • Hi!
    I think it is Anaconda3 definitely, as I had again the problem after playing around with the python bindings. I have submitted a samson log which shows an error.



  • Thank you for reporting, @Elisa !

    In the report message, you write that you get this problem when you try to run Debug. The Python scripting is supported only in Release mode since Python is not shipped with debug libraries.

    Is the crash report you submitted from the SAMSON-Debug or from SAMSON?



  • When you create Python bindings for your SAMSON Element, you should do it only for the Release version of the Element and not for the Debug version.



  • From SAMSON release I think.
    So I did the following: I configured everything to get Python Scripting working so I could work on the branch of my project that has the Python bindings. Everything went ok so far, I then checked-out to the branch without python bindings and removed Python Scripting from my elements. Then I tried to run Debug and it crashed, I could run Samson release but I got that error. I removed Anaconda3 from my path, re-run cmake and the error was gone.



  • Did you clean the project (clean, re-run cmake) after checking the version without Python bindings?

    If you add Anaconda3 to your Path environment variable now, does SAMSON crash when you run in Debug?

    I suggest adding some variable defining whether you compile the project with Python bindings or without such that it won't be compiled with Python bindings in the Debug mode at all, e.g. in the CMakeLists.txt of your Element (see the PyBindTutorial sample):

    ####################################################
    #   Python bindings
    ####################################################
    IF( NOT DEBUG ) # Disable the creation of Python bindings in the Debug mode since Python is not supported in the Debug mode
    
        FIND_PACKAGE( PythonInterp ${PYTHON_VERSION} REQUIRED )
    
    	IF ( PYTHONINTERP_FOUND )
    	    SET(CREATE_PYTHON_BINDINGS TRUE)
    	ENDIF ( PYTHONINTERP_FOUND )
    
    ENDIF()
    
    IF ( CREATE_PYTHON_BINDINGS )
    
        # Determine Python paths, see PyBindTutorial
        # ...
    
        # This define is used in the code to determine whether Python bindings should be created or not
        add_definitions(-DCREATE_PYTHON_BINDINGS)
    
    ELSE ( CREATE_PYTHON_BINDINGS )
    
        SET (PYTHON_LIBRARY "")
    
    ENDIF ( CREATE_PYTHON_BINDINGS )
    
    # ...
    
    TARGET_LINK_LIBRARIES (	${OUTPUT_NAME}
    			${QT_LIBRARIES}
    			${PYTHON_LIBRARY}
    			${OPENGL_LIBRARY}
    			${SAMSON_SDK_LIBRARIES} )
    
    

    And then use this CREATE_PYTHON_BINDINGS variable in your code like it is done in the PyBindTutorial sample, e.g.:

    #ifdef CREATE_PYTHON_BINDINGS
    
    #include "pybind11/pybind11.h"
    
    // ...
    
    #endif
    

    You can test whether you have the same problem with the PyBindTutorial sample when you compile it in the Release mode, and then launch SAMSON in the Debug mode.



  • Hi, yes, I deleted the build folder and run cmake after checking out from the Python bindings version. If I add Anaconda3 now I don't think it will crush unless I re-run cmake again, I have cloned my repository again so I don't need to check out and will test this next time I run the version with python bindings.

    I never had problems launching the version with Python Bindings in the debug mode, it just doesn't show up but otherwise runs fine, but I will check again.



  • Could you, please, also check whether in the CMakeLists of your Element you link to a Python library even in the Debug version?


Log in to reply
 

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