Skip to content
  • Recent
  • Tags
  • Popular
  • SAMSON Connect
  • Get SAMSON
Collapse
SAMSON Forum
  1. Home
  2. Develop
  3. Getting started
  4. Build a Debug mode on linux

Build a Debug mode on linux

Scheduled Pinned Locked Moved Getting started
30 Posts 2 Posters 37.9k 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.
  • LaëtitiaL Laëtitia

    ok, I am continuing my reading and it's look like I should do this addition directly in Qtcreator. Right?

    DmitriyMarinD
    DmitriyMarinD
    DmitriyMarin
    wrote on last edited by
    #3

    Dear @Laëtitia ,

    Yes, this was a brief description in the beginning of the tutorial of steps which are necessary to do in an IDE of your choice. If you are using QtCreator, you should specify these variables in the Project settings.

    Best,
    Dmitriy

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

    1 Reply Last reply
    0
    • LaëtitiaL
      LaëtitiaL
      Laëtitia
      wrote on last edited by
      #4

      thanks for your answer.
      Indeed I can specify easily add seetings in Qt. That part I get now.
      What is worying me is that when I open my project I don't have the MyElement cpp files opened, just the CMakeLists.txt is there. Please see attached a screenshot with on the left what I have and on the right what is in the tutorial.
      0_1543502530367_Capture du 2018-11-29 15-40-18.png

      DmitriyMarinD 1 Reply Last reply
      0
      • LaëtitiaL Laëtitia

        thanks for your answer.
        Indeed I can specify easily add seetings in Qt. That part I get now.
        What is worying me is that when I open my project I don't have the MyElement cpp files opened, just the CMakeLists.txt is there. Please see attached a screenshot with on the left what I have and on the right what is in the tutorial.
        0_1543502530367_Capture du 2018-11-29 15-40-18.png

        DmitriyMarinD
        DmitriyMarinD
        DmitriyMarin
        wrote on last edited by
        #5

        Have you specified the SAMSON_SDK_PATH in the Project settings? It should be set to your SAMSON SDK installation, e.g.: /home/user/NANO-D/SDK/0.7.0
        After setting it, press on the "Apply Configuration Changes" button.

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

        1 Reply Last reply
        1
        • LaëtitiaL
          LaëtitiaL
          Laëtitia
          wrote on last edited by
          #6

          yes I did and it find all samson things but it's the MyElement cpp files that it's not finding.

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

            If you properly specified the SAMSON_SDK_PATH, and you still cannot see files in the project that might be due to CMake Generator settings of the chosen Kit in QtCreator during the "Configure Project" step.

            To check with different CMake Generator settings got to Projects -> Manage Kits and choose the Kit you are using. You may try to modify the CMake generator settings, e.g. to the ones shown below, but be aware that they depend on what packages you have installed.

            0_1543504700363_QtCreator-ManageKits.png

            0_1543504706994_QtCreator-ManageKits-CMakeGenerator.png

            You can read more on setting Kits in QtCreator here: http://doc.qt.io/qtcreator/creator-project-cmake.html

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

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

              Usually, if the Kit in QtCreator has some non-valid settings (e.g., CMake generator), it will be shown with a warning sign as for the last Kit on the picture below:
              0_1543505161165_QtCreator-Kits-Warning.png

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

              1 Reply Last reply
              1
              • LaëtitiaL
                LaëtitiaL
                Laëtitia
                wrote on last edited by
                #9

                Thanks for your response, and sorry for the late replay.
                I now see the problem, or at least one problem, I have no autodetect kit and the other one seems broken so maybe it's my qt5.9 that is not as it should be?

                1 Reply Last reply
                0
                • LaëtitiaL
                  LaëtitiaL
                  Laëtitia
                  wrote on last edited by
                  #10

                  0_1543916823864_Capture du 2018-12-04 10-46-24.png

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

                    Usually, QtCreator should automatically detect/create the Kit for you, but it depends on the order of installation, e.g. if QtCreator you are using is installed before the Qt your want to use. You may try to use the "Desktop" one and if you still experience the problem, you may try to modify "CMake generator" in the Kit preferences (you do not need to create project from the scratch, just go to "Projects -> Manage kits ..." and modify the Kit you are using - try setting different "Generator" and "Extra generator").

                    To determine, whether this problem is due to QtCreator (Kits), you may try creating any project in QtCreator itself (e.g., Application Console Project) and see check if it shows you source and header files.

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

                    1 Reply Last reply
                    0
                    • LaëtitiaL
                      LaëtitiaL
                      Laëtitia
                      wrote on last edited by
                      #12

                      ok I'll try, it's true I have another version installed that I used usually, I installed 5.9 specifiquelly for samson. I'll try

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

                        You also need to have CMake installed with a version at least 2.8.9.

                        You may try to set the next generators in the "CMake generator" for your Kit: Unix Makefiles, Ninja (for that you need to have the "ninja-build" package installed).
                        As an "Extra generator", I have CodeBlocks set, but it is dependant on your system.

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

                        1 Reply Last reply
                        0
                        • LaëtitiaL
                          LaëtitiaL
                          Laëtitia
                          wrote on last edited by
                          #14

                          oh it's compiling fine now!
                          thanks!

                          DmitriyMarinD 1 Reply Last reply
                          0
                          • LaëtitiaL Laëtitia

                            oh it's compiling fine now!
                            thanks!

                            DmitriyMarinD
                            DmitriyMarinD
                            DmitriyMarin
                            wrote on last edited by
                            #15

                            Great! Congratulations!
                            What was the problem? The generators in the Kit? If so which one did you set?

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

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

                              You can find more SAMSON Developer tutorials and we will be adding more source code soon on github: https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials/tree/develop. For example, you may check the AtomShaker tutorial.

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

                              1 Reply Last reply
                              0
                              • LaëtitiaL
                                LaëtitiaL
                                Laëtitia
                                wrote on last edited by Laëtitia
                                #17

                                yes it was the kits, there was no autodetected ones.

                                1 Reply Last reply
                                1
                                • LaëtitiaL
                                  LaëtitiaL
                                  Laëtitia
                                  wrote on last edited by
                                  #18

                                  Hello,

                                  I am now stuck with the launching of SAMSON-Debug. the launchind fails and says:
                                  This application failed to start because it could not find or load the Qt platform plugin "xcb"in "".
                                  Reinstalling the application may fix this problem.

                                  I tried to reinstall, not changing anything...

                                  Best

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

                                    Dear @Laëtitia

                                    Do you try to launch with SAMSON Element Samples from github? If so, then in the root CMakeLists.txt you need to disable PyBindTutorial (just comment ADD_SUBDIRECTORY( PyBindTutorial )).

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

                                    1 Reply Last reply
                                    0
                                    • LaëtitiaL
                                      LaëtitiaL
                                      Laëtitia
                                      wrote on last edited by
                                      #20

                                      euh no, I just tried to launch SAMSON-Core.sh in NANO-D/SDK/0.7.0/SAMSON-Debug/Binaries to have a look at the "new" element I created (the empty one I had problem displaying and compiling before with Qt)

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

                                        @Laëtitia

                                        Have you provided a path to your Qt installation in the SAMSON-Core.sh script for SAMSON-Debug?

                                        It should be smth like this: export LD_LIBRARY_PATH=/home/YourUser/Qt/Qt5.9.3/5.9.3/gcc_64/lib:$script_dir:$LD_LIBRARY_PATH

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

                                        1 Reply Last reply
                                        0
                                        • LaëtitiaL
                                          LaëtitiaL
                                          Laëtitia
                                          wrote on last edited by Laëtitia
                                          #22

                                          yes, I did
                                          export LD_LIBRARY_PATH=$script_dir:/home/bomble/Qt5.9.3/5.9.3/gcc_64/lib/:$LD_LIBRARY_PATH

                                          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
                                          0
                                          • Recent
                                          • Tags
                                          • Popular
                                          • SAMSON Connect
                                          • Get SAMSON