Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multiple matches for get_lang #124

Open
unexist opened this issue Nov 22, 2024 · 0 comments
Open

Multiple matches for get_lang #124

unexist opened this issue Nov 22, 2024 · 0 comments

Comments

@unexist
Copy link

unexist commented Nov 22, 2024

I am currently giving AsciiDoxy a try and want to demonstrate the usage in a showcase. Unfortunately I am running into problems when I use a header with a forward declaration:

ERROR: Error while processing AsciiDoc files:
Multiple matches for get_lang. Please provide more details.
Matching candidates:
cpp function get_lang(const char *)
cpp function get_lang(const char *)
Traceback:
  File index.adoc, line 18, in AsciiDoc
    ${insert("get_lang")}
  File /usr/lib/python3.12/site-packages/asciidoxy/generator/asciidoc.py, line 140, in _wrapper
    ret = f(*args, **kwargs)
  File /usr/lib/python3.12/site-packages/asciidoxy/generator/asciidoc.py, line 281, in insert
    return self.insert_fragment(self.find_element(name,
  File /usr/lib/python3.12/site-packages/asciidoxy/generator/asciidoc.py, line 595, in find_element
    raise AmbiguousReferenceError(name, ex.candidates)
make: *** [asciidoxy] Error 1

The error is understandable, Doxygen finds the forward and the actual declaration and both can be seen in the resulting xml files:

$ grep get_lang doxygen/xml/lang_8*
doxygen/xml/lang_8c.xml:73:        <definition>char * get_lang</definition>
doxygen/xml/lang_8c.xml:75:        <name>get_lang</name>

doxygen/xml/lang_8h.xml:22:        <definition>char * get_lang</definition>
doxygen/xml/lang_8h.xml:24:        <name>get_lang</name>

So how can I tell AsciiDoxy to use a specific definition? Access to the location tag or something alike would be great:

<location file="src/lang.h" line="24" column="6" bodyfile="src/lang.c" bodystart="43" bodyend="57" declfile="src/lang.h" declline="24" declcolumn="6"/>

${insert("get_lang", location="src/lang.h")}

Everything I have done can be found here:

https://github.com/unexist/showcase-asciidoxy

Versions:

Doxygen 1.11.0
AsciiDoxy 0.8.7

@unexist unexist changed the title Multiple matches for get_lang. Multiple matches for get_lang Dec 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant