SAMSON Forum
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • SAMSON Connect
    • Get SAMSON

    Qt dependencies for Windows 10

    Getting started
    2
    23
    12107
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • DmitriyMarin
      DmitriyMarin last edited by

      Let's try without such drastic actions.

      Dmitriy,
      The SAMSON Team, https://s-c.io

      1 Reply Last reply Reply Quote 0
      • DmitriyMarin
        DmitriyMarin last edited by

        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.

        Dmitriy,
        The SAMSON Team, https://s-c.io

        1 Reply Last reply Reply Quote 0
        • DmitriyMarin
          DmitriyMarin last edited by DmitriyMarin

          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.

          Dmitriy,
          The SAMSON Team, https://s-c.io

          1 Reply Last reply Reply Quote 0
          • DmitriyMarin
            DmitriyMarin last edited by

            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.

            Dmitriy,
            The SAMSON Team, https://s-c.io

            1 Reply Last reply Reply Quote 0
            • DmitriyMarin
              DmitriyMarin last edited by

              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.

              Dmitriy,
              The SAMSON Team, https://s-c.io

              1 Reply Last reply Reply Quote 0
              • E
                Elisa last edited by

                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!!

                1 Reply Last reply Reply Quote 0
                • DmitriyMarin
                  DmitriyMarin last edited by DmitriyMarin

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

                  Dmitriy,
                  The SAMSON Team, https://s-c.io

                  1 Reply Last reply Reply Quote 0
                  • E
                    Elisa last edited by

                    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.

                    1 Reply Last reply Reply Quote 0
                    • E
                      Elisa last edited by

                      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

                      1 Reply Last reply Reply Quote 0
                      • DmitriyMarin
                        DmitriyMarin last edited by

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

                        Dmitriy,
                        The SAMSON Team, https://s-c.io

                        1 Reply Last reply Reply Quote 0
                        • E
                          Elisa last edited by

                          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).

                          1 Reply Last reply Reply Quote 0
                          • DmitriyMarin
                            DmitriyMarin last edited by

                            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.

                            Dmitriy,
                            The SAMSON Team, https://s-c.io

                            1 Reply Last reply Reply Quote 1
                            • E
                              Elisa last edited by

                              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.

                              1 Reply Last reply Reply Quote 0
                              • DmitriyMarin
                                DmitriyMarin last edited by

                                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?

                                Dmitriy,
                                The SAMSON Team, https://s-c.io

                                1 Reply Last reply Reply Quote 0
                                • DmitriyMarin
                                  DmitriyMarin last edited by

                                  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.

                                  Dmitriy,
                                  The SAMSON Team, https://s-c.io

                                  1 Reply Last reply Reply Quote 0
                                  • E
                                    Elisa last edited by

                                    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.

                                    1 Reply Last reply Reply Quote 0
                                    • DmitriyMarin
                                      DmitriyMarin last edited by

                                      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.

                                      Dmitriy,
                                      The SAMSON Team, https://s-c.io

                                      1 Reply Last reply Reply Quote 1
                                      • E
                                        Elisa last edited by

                                        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.

                                        1 Reply Last reply Reply Quote 0
                                        • DmitriyMarin
                                          DmitriyMarin last edited by

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

                                          Dmitriy,
                                          The SAMSON Team, https://s-c.io

                                          1 Reply Last reply Reply Quote 0
                                          • E
                                            Elisa last edited by

                                            Hi Dmitriy,
                                            My CMakeLists for the Python Bindings version is like you posted above, so I'm not linking in the debug mode. My other branches don't have any reference to Python in the CMakeLists, so they are not linking neither.

                                            1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post