title: Insert link to function in another file with Doxygen?
body: <p>I have two C source files. A comment to a function <code>bar()</code>in file <code>A</code> needs to refer to a function <code>foo()</code> in file <code>B</code>. How can I make this link?</p>
  
  <p>I tried:</p>
  
  <ol>
  <li><p>Writing something like: <code>B.c::foo()</code> hoping that doxygen would go to file <code>B</code> and find function <code>foo</code> there.</p></li>
  <li><p>Also tried simply <code>::foo()</code> but that did not help.</p></li>
  <li><p>Then I tried giving file <code>B.c</code> a special tagname as in doing <code>//! @file specialtag</code> on first line of <code>B.c</code> and then doing <code>specialtag::foo()</code> in my comment but not much has changed.</p></li>
  <li><p>I tried to force the link with <code>\ref</code> and <code>\link</code> but even that did not help.</p></li>
  </ol>
  
  <p>The <code>//! @file</code> line is present in both <code>A.c</code> and <code>B.c</code> so doxygen should be aware of the code.</p>
  
  <p><strong>EDIT</strong></p>
  
  <p>I tried what @doxygen suggested but with no luck. I made an example project to show where I am running into problems, its here: <a href="http://www.filedropper.com/testdoxygen2tar" rel="noreferrer">http://www.filedropper.com/testdoxygen2tar</a></p>
  
  <p>I used the default setup file, made with <code>doxygen -g</code>.
  The output I am getting:
  <img src="https://i.stack.imgur.com/SSJgP.png" alt="Firefox showing the page generated by doxygen"></p>
  
  <p>You can see that the foobar function is not being linked to.</p>
  
  <p><strong>EDIT 2</strong></p>
  
  <p>Found the problem. Function <code>foo</code> was undocumented and so no page for it was generated, so of course doxygen had no page to link to. (I was generating documentation with the <code>SOURCE_BROWSER</code> option enabled and hoping that a link to function definition would be generated)</p>