<div dir="ltr">Hi,<br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 6, 2013 at 12:23 PM, Jochen Hub <span dir="ltr">&lt;<a href="mailto:jhub@gwdg.de" target="_blank">jhub@gwdg.de</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have added OpenMP support to g_wham and pushed the change to gerrit. I<br>
get errors such as:<br>
<br>
undefined reference to `gmx_omp_set_num_threads(int)&#39;<br>
<br>
or<br>
<br>
unresolved external symbol &quot;int __cdecl gmx_omp_get_max_threads(void)&quot;<br>
(?gmx_omp_get_max_threads@@YAHXZ) referenced in function gmx_wham<br>
<br>
The code compiles fine under Mac and linux (without and with OpenMP<br>
support).<br></blockquote><div><br></div><div style>Sounds suspicious, given that Jenkins fails to build it in all combinations that have OpenMP enabled. </div><div style><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

However, what is also strange is that I have to protect the<br>
mx_omp_set_num_threads() and gmx_omp_get_max_threads() with an #ifdef<br>
GMX_OPENMP - while this is not required in, for instance in gmx_sans.c.<br>
The only reason I could think of is a C vs. C++ issue.<br>
<br>
Can someone give a hint how to proceed?<br></blockquote><div><br></div><div style>You need to add extern &quot;C&quot; declarations to gmx_omp.h. See other header files for examples.</div><div style><br></div><div style>
Best regards,</div><div style>Teemu</div></div></div></div>