Skip to content
0
  • Recent
  • Tags
  • Popular
  • SAMSON Connect
  • Get SAMSON
  • Recent
  • Tags
  • Popular
  • SAMSON Connect
  • Get SAMSON
Collapse
SAMSON Forum
  1. Home
  2. Develop
  3. Getting started
  4. Qt dependencies for Windows 10

Qt dependencies for Windows 10

Scheduled Pinned Locked Moved Getting started
23 Posts 2 Posters 29.6k Views 1 Watching
  • 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.
  • DmitriyMarinD
    DmitriyMarinD
    DmitriyMarin
    wrote on last edited by DmitriyMarin
    #2

    Dear @Elisa ,
    SAMSON 0.7.0 uses Qt 5.9.3 and SAMSON Elements for SAMSON 0.7.0 should be compiled with Qt 5.9.3 (see SAMSON SDK Installation instructions and a tutorial on building a SAMSON Element on Windows). Could you, please, install Qt 5.9.3 and try to compile against it and see if you still have the problem.

    In SAMSON 0.8.0 we will be using Qt 5.11.

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

    1 Reply Last reply
    0
    • E
      E
      Elisa
      wrote on last edited by
      #3

      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.

      1 Reply Last reply
      0
      • DmitriyMarinD
        DmitriyMarinD
        DmitriyMarin
        wrote on last edited by
        #4

        Let's try without such drastic actions.

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

        1 Reply Last reply
        0
        • DmitriyMarinD
          DmitriyMarinD
          DmitriyMarin
          wrote on last edited by
          #5

          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
          0
          • DmitriyMarinD
            DmitriyMarinD
            DmitriyMarin
            wrote on last edited by DmitriyMarin
            #6

            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
            0
            • DmitriyMarinD
              DmitriyMarinD
              DmitriyMarin
              wrote on last edited by
              #7

              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
              0
              • DmitriyMarinD
                DmitriyMarinD
                DmitriyMarin
                wrote on last edited by
                #8

                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
                0
                • E
                  E
                  Elisa
                  wrote on last edited by
                  #9

                  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
                  0
                  • DmitriyMarinD
                    DmitriyMarinD
                    DmitriyMarin
                    wrote on last edited by DmitriyMarin
                    #10

                    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
                    0
                    • E
                      E
                      Elisa
                      wrote on last edited by
                      #11

                      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
                      0
                      • E
                        E
                        Elisa
                        wrote on last edited by
                        #12

                        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
                        0
                        • DmitriyMarinD
                          DmitriyMarinD
                          DmitriyMarin
                          wrote on last edited by
                          #13

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

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

                          1 Reply Last reply
                          0
                          • E
                            E
                            Elisa
                            wrote on last edited by
                            #14

                            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
                            0
                            • DmitriyMarinD
                              DmitriyMarinD
                              DmitriyMarin
                              wrote on last edited by
                              #15

                              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
                              1
                              • E
                                E
                                Elisa
                                wrote on last edited by
                                #16

                                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
                                0
                                • DmitriyMarinD
                                  DmitriyMarinD
                                  DmitriyMarin
                                  wrote on last edited by
                                  #17

                                  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
                                  0
                                  • DmitriyMarinD
                                    DmitriyMarinD
                                    DmitriyMarin
                                    wrote on last edited by
                                    #18

                                    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
                                    0
                                    • E
                                      E
                                      Elisa
                                      wrote on last edited by
                                      #19

                                      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
                                      0
                                      • DmitriyMarinD
                                        DmitriyMarinD
                                        DmitriyMarin
                                        wrote on last edited by
                                        #20

                                        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
                                        1
                                        • E
                                          E
                                          Elisa
                                          wrote on last edited by
                                          #21

                                          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
                                          0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better 💗

                                          Register Login
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post