Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Shared Code Library
Forum Updated to NodeBB v4.3 + New Features

Shared Code Library

Scheduled Pinned Locked Moved Unsolved General and Desktop
13 Posts 3 Posters 2.4k Views 2 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.
  • mrjjM Offline
    mrjjM Offline
    mrjj
    Lifetime Qt Champion
    wrote on last edited by mrjj
    #2

    Hi
    There is nothing like smalltalk image in c++ if you mean this definition
    "Smalltalk objects live in something called an image. An image is a snapshot of memory containing all the objects at a given point in time."
    While you can just save all instances of a class to a file, its not possible to just load it again. Smalltalk used a vm for this. C++ has no such concept.

    If not a runtime library, then what sort of library do you mean ?

    O 1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #3

      Hi,

      From your description, it rather looks like a project management issue e.g. using git, have your library as a submodule of the projects that uses it and then keep it up to date through code reviews and proper project management.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      O 1 Reply Last reply
      2
      • mrjjM mrjj

        Hi
        There is nothing like smalltalk image in c++ if you mean this definition
        "Smalltalk objects live in something called an image. An image is a snapshot of memory containing all the objects at a given point in time."
        While you can just save all instances of a class to a file, its not possible to just load it again. Smalltalk used a vm for this. C++ has no such concept.

        If not a runtime library, then what sort of library do you mean ?

        O Offline
        O Offline
        ofmrew
        wrote on last edited by
        #4

        @mrjj I know from working with C++ in the distant past--everything was compiled. The application I am developing is complex and how to do things are not really defined; it is an exploratory type of application for which Smalltalk was well suited; C++ is more, in my estimation, suited to well defined application were everything is known, a priori knowledge.

        I want to have a class that is mostly defined, but lacks features. I create one or more exploratory projects that uses that code, but also makes changes to it as the texting and development continues. This continues until the best approach shakes out. The reason I say that the application is complex is that there are many unknown approaches to be determined, but I what the shared code to be available to all projects in the development.

        I am using a divide and conquer approach; focus on one aspect and when a reasonable answer is found move on to the next, but also be prepared to backtrack. In Smalltalk a project would jut be a class that was included in the image with the code in classes, also in the image. The code I want is in files and it seems that I should

        The alternative I am using now is to create a project to explore an aspect classes in that project are manually copied into the next project to explore another aspect, so on and so forth. The code I want is in files and it seems that I should be able to point Qt to them.

        What am I missing?

        mrjjM 1 Reply Last reply
        0
        • SGaistS SGaist

          Hi,

          From your description, it rather looks like a project management issue e.g. using git, have your library as a submodule of the projects that uses it and then keep it up to date through code reviews and proper project management.

          O Offline
          O Offline
          ofmrew
          wrote on last edited by
          #5

          @SGaist I am the only developer--using the Chief Programmer concept, project management and code reviews are in my head. I have not used git, but if it will solve my problem, I am more than willing to learn it. Is there some documentation that explains the interface between git and Qt?

          1 Reply Last reply
          0
          • O ofmrew

            @mrjj I know from working with C++ in the distant past--everything was compiled. The application I am developing is complex and how to do things are not really defined; it is an exploratory type of application for which Smalltalk was well suited; C++ is more, in my estimation, suited to well defined application were everything is known, a priori knowledge.

            I want to have a class that is mostly defined, but lacks features. I create one or more exploratory projects that uses that code, but also makes changes to it as the texting and development continues. This continues until the best approach shakes out. The reason I say that the application is complex is that there are many unknown approaches to be determined, but I what the shared code to be available to all projects in the development.

            I am using a divide and conquer approach; focus on one aspect and when a reasonable answer is found move on to the next, but also be prepared to backtrack. In Smalltalk a project would jut be a class that was included in the image with the code in classes, also in the image. The code I want is in files and it seems that I should

            The alternative I am using now is to create a project to explore an aspect classes in that project are manually copied into the next project to explore another aspect, so on and so forth. The code I want is in files and it seems that I should be able to point Qt to them.

            What am I missing?

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by mrjj
            #6

            @ofmrew
            Hi
            If you use a code revision system, you can add tags to be able to backtrack to
            a state of the project in time, or have multiple version of the same project
            sharing files and sharing updates.
            If you want to be able to say experiment on a code base, save the result and then next day, load another version of the project and try something else
            then a code control will be your friend.

            Many people uses GIT.
            https://readwrite.com/2013/09/30/understanding-github-a-journey-for-beginners-part-1/

            O 1 Reply Last reply
            0
            • mrjjM mrjj

              @ofmrew
              Hi
              If you use a code revision system, you can add tags to be able to backtrack to
              a state of the project in time, or have multiple version of the same project
              sharing files and sharing updates.
              If you want to be able to say experiment on a code base, save the result and then next day, load another version of the project and try something else
              then a code control will be your friend.

              Many people uses GIT.
              https://readwrite.com/2013/09/30/understanding-github-a-journey-for-beginners-part-1/

              O Offline
              O Offline
              ofmrew
              wrote on last edited by
              #7

              @mrjj Which works the best with Qt?

              mrjjM 1 Reply Last reply
              0
              • O ofmrew

                @mrjj Which works the best with Qt?

                mrjjM Offline
                mrjjM Offline
                mrjj
                Lifetime Qt Champion
                wrote on last edited by mrjj
                #8

                @ofmrew
                All of them. Qt need nothing special.

                I used subversion directly in Creator.
                I assume there is a GIT interface also.

                I would recommend a bit of research on the code revision subject to make sure its what you are after.
                Its sounds like it but so far from smalltalk to c++ that you could have other desires.

                O 1 Reply Last reply
                1
                • mrjjM mrjj

                  @ofmrew
                  All of them. Qt need nothing special.

                  I used subversion directly in Creator.
                  I assume there is a GIT interface also.

                  I would recommend a bit of research on the code revision subject to make sure its what you are after.
                  Its sounds like it but so far from smalltalk to c++ that you could have other desires.

                  O Offline
                  O Offline
                  ofmrew
                  wrote on last edited by
                  #9

                  @mrjj Thanks. I will look into Subversion, but I have not seen how it can be use to share one group of classes that are not compiled across multiple projects.

                  This will probably show my ignorance of the structure of the C++ file system, but you can have .h and .cpp files that you include. It would seem to me that in Qt I should be able to have multiple Qt projects point to the same .h an .cpp files using the add existing files. I will try that.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #10

                    That has nothing to do with Qt. It's standard C++ project management.

                    If you want to have a library that all your projects can use and that you can modify at will, then make it an autonomous project, build and install that library on your system and use it like any other C++ library.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    1 Reply Last reply
                    2
                    • mrjjM Offline
                      mrjjM Offline
                      mrjj
                      Lifetime Qt Champion
                      wrote on last edited by mrjj
                      #11

                      I would recommend GIT as its the new app, all is using and there are
                      tons and tons of info about using it.

                      • share one group of classes that are not compiled across multiple projects.

                      You would share the files. ( and hence the classes)
                      Have them under code revision.

                      Then in Project A
                      you update something in the shared part.
                      You commit that change to the server.

                      Then in Project B
                      You just say Update and now project B also have any changes that were
                      made in A.
                      With no copying files around etc.

                      Is that what you mean?

                      O 1 Reply Last reply
                      0
                      • mrjjM mrjj

                        I would recommend GIT as its the new app, all is using and there are
                        tons and tons of info about using it.

                        • share one group of classes that are not compiled across multiple projects.

                        You would share the files. ( and hence the classes)
                        Have them under code revision.

                        Then in Project A
                        you update something in the shared part.
                        You commit that change to the server.

                        Then in Project B
                        You just say Update and now project B also have any changes that were
                        made in A.
                        With no copying files around etc.

                        Is that what you mean?

                        O Offline
                        O Offline
                        ofmrew
                        wrote on last edited by
                        #12

                        @mrjj That sounds like it is exactly what I want; I am only interested in sharing code, not compiled code, because it if far from being finalized. I want to thank all for adding comments. To SGaist, what is an autonomous project?

                        mrjjM 1 Reply Last reply
                        0
                        • O ofmrew

                          @mrjj That sounds like it is exactly what I want; I am only interested in sharing code, not compiled code, because it if far from being finalized. I want to thank all for adding comments. To SGaist, what is an autonomous project?

                          mrjjM Offline
                          mrjjM Offline
                          mrjj
                          Lifetime Qt Champion
                          wrote on last edited by mrjj
                          #13

                          @ofmrew said in Shared Code Library:

                          autonomous project?

                          Hi.
                          Like a standalone project.
                          If you made a shared library, all project would/could share it.
                          If you installed it on your system, it would be like any other shared library.
                          If you made a new version, all would use the new version.
                          But this is compiled code.

                          1 Reply Last reply
                          1

                          • Login

                          • Login or register to search.
                          • First post
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved