08-26-2013 06:16 AM - edited 08-26-2013 06:28 AM
Hello,
Just tried OpenMP and linking fails if the default calling convention is set to "__stdcall".
error: Undefined symbol '__imp___omp_cvi_barrier@4' referenced in "c:\Users\Public\Documents\National Instruments\CVI2013\samples\OpenMP\cvibuild.mandel_omp\Debug\mandel_omp.obj".
(and so on)
omp.h is missing the calling conventions. Is CVIFUNC_C the right one?
08-30-2013 01:52 PM
You are correct. Because the calling convention is not specified, when __stdcall is set in Build Options, the default for unspecified functions becomes __stdcall. Since OpenMP was built with __cdecl, this causes linker errors. If you add CVIFUNC_C to omp.h and omp_cvi_internal.h. A simple fix would be to add it to the end of the OMP_API definition.
I have filed a bug report for this issue. You can track it with ID 424782.