Giter Club home page Giter Club logo

Comments (9)

bkryza avatar bkryza commented on June 7, 2024

@hunterzju here is a test case and example for such situation (adjust your paths accordingly):

https://github.com/bkryza/clang-uml/blob/master/docs/test_cases/t00045.md

basically skip using_namespace and include..namespaces directives and exclude as much as you need from your dependencies (definitely exclude std)

from clang-uml.

hunterzju avatar hunterzju commented on June 7, 2024

@hunterzju here is a test case and example for such situation (adjust your paths accordingly):

https://github.com/bkryza/clang-uml/blob/master/docs/test_cases/t00045.md

basically skip using_namespace and include..namespaces directives and exclude as much as you need from your dependencies (definitely exclude std)

I get Err with such config:

compilation_database_dir: ../build/
output_directory: ../docs/01Iterator
diagrams:
  iterator_class:
    type: class
    glob:
      - ./*.cpp
      - ./*.hpp
      - ./*.h
    exclude:
      namespace:
        - std

there are some cpp files in the folder, I want to know if my conig has some error?
image

from clang-uml.

bkryza avatar bkryza commented on June 7, 2024

@hunterzju Where in the project structure is your .clang-uml file? Can you paste here the output of:

find . -name "*.cpp"
find . -name "compile_commands.json"
find . -name ".clang-uml"

executed in your projects root directory, or at least some part of the output...

from clang-uml.

hunterzju avatar hunterzju commented on June 7, 2024

@hunterzju Where in the project structure is your .clang-uml file? Can you paste here the output of:

find . -name "*.cpp"
find . -name "compile_commands.json"
find . -name ".clang-uml"

executed in your projects root directory, or at least some part of the output...

// tree ./ -la
├── Aggregate.h
├── Book.h
├── BookSelf.cpp
├── BookSelf.h
├── BookSelfIterator.cpp
├── BookSelfIterator.h
├── .clang-uml
├── CMakeLists.txt
├── .gdb_history
├── Iterator.h
├── main.cpp
└── ReadMe.md

and the "compile_commands.json" is in ../build/compile_commands.json
my system is manjaro linux.

from clang-uml.

hunterzju avatar hunterzju commented on June 7, 2024

I run clang-uml with gdb and the error comes in
image

when I run next here, the error info printed:
image

from clang-uml.

hunterzju avatar hunterzju commented on June 7, 2024

It seems to get error in src/util/util.cc: line 54:
image

from clang-uml.

bkryza avatar bkryza commented on June 7, 2024

@hunterzju Thanks for debugging!

There are 2 possible reasons I can see:

  • out of source build (build directory outside of the root directory)
  • some problem with git:
    • do you have git installed?
    • does your project root contains .git directory?

Obviously git shouldn't be a requirement :-)

I'll try to reproduce it later, I'm not sure I've checked with out-of-source builds, but if you want to use all translation units anyway, you can simply skip the glob directive, in which case it should just take all translation units from the compilation_commands.json:

compilation_database_dir: ../build/
output_directory: ../docs/01Iterator
diagrams:
  iterator_class:
    type: class
    exclude:
      namespace:
        - std

If this doesn't help, could you reconfigure cmake to move the build directory inside of your projects' root dir and try again?

from clang-uml.

bkryza avatar bkryza commented on June 7, 2024

@hunterzju I've reproduced the problem, I'll try to fix it as your original config should work, but the following configuration should work for you:

compilation_database_dir: ../build/
output_directory: ../docs/01Iterator
diagrams:
  iterator_class:
    type: class
    glob:
      - "*.cpp"
    exclude:
      namespaces:
        - std

from clang-uml.

hunterzju avatar hunterzju commented on June 7, 2024

Thank a lot, this works for me.

from clang-uml.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.