Menu

#2 Can't Get Diagrams

1.0
open
nobody
None
2017-04-11
2017-04-11
No

I am starting to work on a C++ project in an old version of Microsoft Visual Studio and I want to get a couple of diagrams to help me understand the code base, including the class structure. I don't want to build the project (yet), I just want to see the diagrams.

In the User Guide, under Quick Start, it states:

  1. Build a project. These steps are not required for viewing diagrams.

I set the Project Settings, including the Root Source Directory. When I click OK, I get:

+-------------------------+
Analyzing
OovBuilder:Unable to read project for finding components

oovBuilder: Oov project file must exist in C:/Users/Todd/Documents/ProfDev/BART/BART

Complete
+-------------------------+

How can I be having a problem with OovBuilder if I don't need to build the project?

Can you help me get to diagramming the classes in this code base?

thanks,
Todd

Related

Tickets: #2

Discussion

  • animatedb

    animatedb - 2017-04-14

    Sorry, I might have used the word "build" ambiguously.  The full project does not need to be built, but the OovBuilder program is used to run the analysis phase.
    The "Root Source Directory" should be the parent directory that contains the files to analyze.  The "Oovaide Project Directory" is a location where information will be kept about the analyzed program.  This directory must be a writable location.
    If this doesn't work, it might be worth using "File"/"New Project" with the examples\simple directory as the "Root Source Directory".  As long as the project directory is writable, it should be very easy to see some drawings.

      From: Todd Hoatson <toddho@users.sf.net>
    

    To: Ticket 2 2@tickets.oovaide.p.re.sf.net
    Sent: Tuesday, April 11, 2017 2:50 PM
    Subject: [oovaide:tickets] #2 Can't Get Diagrams

    [tickets:#2] Can't Get DiagramsStatus: open
    Milestone: 1.0
    Created: Tue Apr 11, 2017 09:50 PM UTC by Todd Hoatson
    Last Updated: Tue Apr 11, 2017 09:50 PM UTC
    Owner: nobodyI am starting to work on a C++ project in an old version of Microsoft Visual Studio and I want to get a couple of diagrams to help me understand the code base, including the class structure. I don't want to build the project (yet), I just want to see the diagrams.In the User Guide, under Quick Start, it states:
    - Build a project. These steps are not required for viewing diagrams.
    I set the Project Settings, including the Root Source Directory. When I click OK, I get:+-------------------------+
    Analyzing
    OovBuilder:Unable to read project for finding componentsoovBuilder: Oov project file must exist in C:/Users/Todd/Documents/ProfDev/BART/BARTComplete
    +-------------------------+How can I be having a problem with OovBuilder if I don't need to build the project?Can you help me get to diagramming the classes in this code base?thanks,
    ToddSent from sourceforge.net because you indicated interest in https://sourceforge.net/p/oovaide/tickets/2/To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Tickets: #2

    • Todd Hoatson

      Todd Hoatson - 2017-04-15

      Hi, thanks for responding.

      I still have the problem. I set the Root Source Directory to point to the
      location of my .cpp files. The Oovaide Project Directory is filled in
      automatically. (See attached .jpg).

      [image: Inline image 2]

      This directory must be a writable location.

      It is already
      writeable, because the program writes several small files to it. (See
      attached .jpg - I tried to send the folder in a .zip, but my e-mail was
      rejected.)

      [image: Inline image 3]

      If this doesn't work, it might be worth using "File"/"New Project" with
      the examples\simple directory as the "Root Source Directory".

      Sorry, I'm not sure what you mean. Can you explain? When I put
      'examples\simple'
      in the "Root Source Directory", I get a message: "The source directory
      does not exist. Do you want to create it?"

      thanks,
      Todd

      On Thu, Apr 13, 2017 at 9:39 PM, animatedb animatedb@users.sf.net wrote:

      Sorry, I might have used the word "build" ambiguously. The full project
      does not need to be built, but the OovBuilder program is used to run the
      analysis phase.
      The "Root Source Directory" should be the parent directory that contains
      the files to analyze. The "Oovaide Project Directory" is a location where
      information will be kept about the analyzed program. This directory must
      be a writable location.
      If this doesn't work, it might be worth using "File"/"New Project" with
      the examples\simple directory as the "Root Source Directory". As long as
      the project directory is writable, it should be very easy to see some
      drawings.

      From: Todd Hoatson toddho@users.sf.net

      To: Ticket 2 2@tickets.oovaide.p.re.sf.net
      Sent: Tuesday, April 11, 2017 2:50 PM
      Subject: [oovaide:tickets] #2 Can't Get Diagrams

      [tickets:#2] https://sourceforge.net/p/oovaide/tickets/2/ Can't Get
      DiagramsStatus: open
      Milestone: 1.0
      Created: Tue Apr 11, 2017 09:50 PM UTC by Todd Hoatson
      Last Updated: Tue Apr 11, 2017 09:50 PM UTC
      Owner: nobodyI am starting to work on a C++ project in an old version of
      Microsoft Visual Studio and I want to get a couple of diagrams to help me
      understand the code base, including the class structure. I don't want to
      build the project (yet), I just want to see the diagrams.In the User Guide,
      under Quick Start, it states:
      - Build a project. These steps are not required for viewing diagrams.
      I set the Project Settings, including the Root Source Directory. When I
      click OK, I get:+-------------------------+
      Analyzing
      OovBuilder:Unable to read project for finding componentsoovBuilder: Oov
      project file must exist in C:/Users/Todd/Documents/
      ProfDev/BART/BARTComplete
      +-------------------------+How can I be having a problem with OovBuilder
      if I don't need to build the project?Can you help me get to diagramming the
      classes in this code base?thanks,
      ToddSent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/oovaide/tickets/2/To unsubscribe from further
      messages, please visit https://sourceforge.net/auth/subscriptions/


      Status: open
      Milestone: 1.0
      Created: Tue Apr 11, 2017 09:50 PM UTC by Todd Hoatson
      Last Updated: Tue Apr 11, 2017 09:50 PM UTC
      Owner: nobody

      I am starting to work on a C++ project in an old version of Microsoft
      Visual Studio and I want to get a couple of diagrams to help me understand
      the code base, including the class structure. I don't want to build the
      project (yet), I just want to see the diagrams.

      In the User Guide, under Quick Start, it states:

      1. Build a project. These steps are not required for viewing diagrams.

      I set the Project Settings, including the Root Source Directory. When I
      click OK, I get:

      +-------------------------+
      Analyzing
      OovBuilder:Unable to read project for finding components

      oovBuilder: Oov project file must exist in C:/Users/Todd/Documents/
      ProfDev/BART/BART

      Complete
      +-------------------------+

      How can I be having a problem with OovBuilder if I don't need to build the
      project?

      Can you help me get to diagramming the classes in this code base?

      thanks,
      Todd


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/oovaide/tickets/2/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

       
      • animatedb

        animatedb - 2017-04-18

        I am not sure if you are on Windows or Linux.
        On Windows, the installed directory hierarchy is something like this:  oovaide    bin    ...    docs
            examples      simple
            lib    ...
        It might be best if the parent directories do not have spaces in the names and that they are not protected.  If you can tell me the directory where oovaide is installed, that may help.

        Selecting File/New Project on the menu will open the Project Settings dialog and by pressing the "..." button, this should allow selecting the .../examples/simple directory that contains mary.h and mary.cpp.  The analysis should start running when OK is pressed on the dialog.
        If you are using Linux, the .deb packages do not install the example files. But on sourceforge there are .tar.gz files that can be downloaded that have the examples. Extracting them somewhere on the disk should allow running the same steps as for Windows above.

         
        • Todd Hoatson

          Todd Hoatson - 2017-04-19

          Hi, thanks for your response. Regarding your suggestions...

          Selecting File/New Project on the menu will open the Project Settings
          dialog and by pressing the "..." button, this should allow selecting the
          .../examples/simple directory that contains mary.h and mary.cpp. The
          analysis should start running when OK is pressed on the dialog.

          When I follow these steps, I get the following error:

          oovBuilder Analyzing: C:/Users/Todd/Downloads/oovaide/examples/simple/mary.h
          C:/Users/Todd/Downloads/oovaide/examples/simple/mary.h:3:10: fatal error:
          'stdio.h' file not found

          OovBuilder: Process returned error ./oovCppParser.exe 1
          Arguments were: ./oovCppParser.exe
          C:/Users/Todd/Downloads/oovaide/examples/simple/mary.h
          C:/Users/Todd/Downloads/oovaide/examples/simple/
          C:/Users/Todd/Downloads/oovaide/examples/simple-oovaide/analysis-28217/ -c
          -x c++ -std=c++11 -IC:/Users/Todd/Downloads/oovaide/examples/simple/

          So what do I do to get your CppParser to find stdio.h?

          It might be best if the parent directories do not have spaces in the
          names and that they are not protected.

          Are you referring to the directories where Oovaide is installed? Or where
          my source code is?

          If you are familiar with Windows, you know that programs are typically
          installed in either "C:\Program Files" or "C:\Program Files (x86)". So a
          program that could not handle a space in the folder/directory name would
          likely have big problems. Fortunately, in this case I have installed
          Oovaide in:
          C:\Users\Todd\Downloads\oovaide
          but my source code is in:
          C:\Users\Todd\Documents\ProfDev\BART\BART Dev\BART\bart26
          which does have a space in it.

          If the space is causing problems for Oovaide, I would suggest you fix the
          program so it will function more acceptably in the Windows environment.
          Otherwise, you will likely find most Windows users will not be able to use
          Oovaide.

          thanks,
          Todd

          On Mon, Apr 17, 2017 at 11:08 PM, animatedb animatedb@users.sf.net wrote:

          I am not sure if you are on Windows or Linux.
          On Windows, the installed directory hierarchy is something like this:
          oovaide bin ... docs
          examples simple
          lib ...
          It might be best if the parent directories do not have spaces in the names
          and that they are not protected. If you can tell me the directory where
          oovaide is installed, that may help.

          Selecting File/New Project on the menu will open the Project Settings
          dialog and by pressing the "..." button, this should allow selecting the
          .../examples/simple directory that contains mary.h and mary.cpp. The
          analysis should start running when OK is pressed on the dialog.
          If you are using Linux, the .deb packages do not install the example
          files. But on sourceforge there are .tar.gz files that can be downloaded
          that have the examples. Extracting them somewhere on the disk should allow
          running the same steps as for Windows above.


          Status: open
          Milestone: 1.0
          Created: Tue Apr 11, 2017 09:50 PM UTC by Todd Hoatson
          Last Updated: Tue Apr 11, 2017 09:50 PM UTC
          Owner: nobody

          I am starting to work on a C++ project in an old version of Microsoft
          Visual Studio and I want to get a couple of diagrams to help me understand
          the code base, including the class structure. I don't want to build the
          project (yet), I just want to see the diagrams.

          In the User Guide, under Quick Start, it states:

          1. Build a project. These steps are not required for viewing diagrams.

          I set the Project Settings, including the Root Source Directory. When I
          click OK, I get:

          +-------------------------+
          Analyzing
          OovBuilder:Unable to read project for finding components

          oovBuilder: Oov project file must exist in C:/Users/Todd/Documents/
          ProfDev/BART/BART

          Complete
          +-------------------------+

          How can I be having a problem with OovBuilder if I don't need to build the
          project?

          Can you help me get to diagramming the classes in this code base?

          thanks,
          Todd


          Sent from sourceforge.net because you indicated interest in
          https://sourceforge.net/p/oovaide/tickets/2/

          To unsubscribe from further messages, please visit
          https://sourceforge.net/auth/subscriptions/

           

          Related

          Tickets: #2

          • animatedb

            animatedb - 2017-04-20

            Ok, now there is a different error. This is what we call success in the software business. (Just kidding)
            The new error means that the Oovbuilder is finding the files to analyze and is using the CLang compiler to extract information.If you look at the diagrams for the example project, there may be some parts already visible. If a project uses a limited number of standard include files or Microsoft specific files, then many of the classes may be visible in the diagrams.

            Clang does not provide its own standard include files. The part of the CLang compiler that is being used for Oovaide is in the
            oovaide/bin directory named libclang.dll, and the one supplied by Oovaide is the dll that is compiled with hard coded paths to look for MinGW standard include paths and not Visual Studio include paths.
            There are a few options to fix the include problem.1. Most likely the best solution is to use the libclang.dll from the LLVM download page. The LLVM download page provides the clang.dll that has hard coded paths to the Visual Studio directories. Download the 3.9.0 version and copy the libclang.dll over the oovaide/bin directory version.  You can backup the first version of the dll if desired. It is very likely that later versions of the libclang.dll will also work.  I have to warn that I have never tried this, but everything that I have read indicates it should work.

            1. Keep the existing libclang.dll and download MinGW. If this is a project that uses Microsoft headers that contain C++ extensions, this will probably will still have problems. This is the solution that I normally use for cross platform projects, and it will work for some Microsoft projects, but it may require setting more switches to get more of the information from the compiler. Some of the Microsoft files cause more problems than others.

            2. Keep the existing libclang.dll and set include paths to some of the Microsoft include files. This will likely have similar problems to #2 above, but does not require MinGW.

            I don't know why your original project path is not working. Now that the example path is working, there may be a way by swapping files or directories to find out why one path can be analyzed (the example directory) and another cannot.

             
            • Todd Hoatson

              Todd Hoatson - 2017-04-20

              Hi, thanks again for your response...

              ... the Oovbuilder is finding the files to analyze and is using the CLang
              compiler to extract information.

              So, it sounds like Oovaide is using a compiler called CLang to get
              information about the classes. I don't know anything about CLang, and I
              don't really want to learn anything about CLang. To me that is just an
              internal issue for your program, so it is important to you, but not to me.
              I would prefer that these details be hidden from the user.

              I would like to be able to download your program, install it, and it just
              works. It seems really strange to me that your program is trying to
              compile mine using a different compiler, as if you expect that to work
              smoothly.

              If you look at the diagrams for the example project, there may be some
              parts already visible.

              I did not see any diagrams when I tried the example project. What I saw
              was an error message that said, "fatal error: 'stdio.h' file not found".
              When I see the words "fatal error", my assumption is that the error is
              fatal. In other words, don't expect to get any diagrams.

              But since you wrote that, I now find that I can click on the diagram
              buttons and see diagrams. That was not at all obvious to me before. And
              looking at my own project, there seem to be some diagrams there also. So I
              will look at those to see if they are accurate and complete.

              Keep the existing libclang.dll and set include paths to some of the
              Microsoft include files.

              I would prefer this option, but I have no idea how to set include paths for
              the CLang compiler. Should these not be in the (Project?) settings of
              Oovaide?

              Maybe your Users Guide should mention some of these things...?

              thanks,
              Todd

               
              • animatedb

                animatedb - 2017-04-26

                The CLang compiler is really the only compiler that has a good interface for extracting the language information.  When I wrote the Oovaide program, I wanted to support the new C++0x or C++11, etc. standards, and I did not want it to only work with Microsoft, especially since during that period Microsoft was not updating their compiler as they were focused on C#.  They are finally making good progress once again in the last few years.

                This also means that a choice of using Microsoft specific build system files was not possible.  The Oovaide program will automatically set include paths to directories within the specified project directory tree, but there is no way to find the system include directories in a uniform manner on Windows and Linux, and for different setups such as Qt, MinGW, etc.  I have tried to make it easier by defining a "Microsoft SDK" and "Visual Studio" selection in "External Project Packages", but I am not sure that it will work for you.

                The users guide has some of the include information listed under the "Build System/Resolving Include Problems During Analysis" section. You may want to try some of the switches listed in the "Windows MFC Example". These switches can be set in the Analysis/Settings/C++ Settings menu.

                 

Log in to post a comment.