I meet a question. When I write a TBB program in console mode. It is running normally.But when I write a TBB program in clr windows form(this program is the same code under clr windows form and console mode). The compiler appear in the wrong information(error C2695).
" \Program Files\Intel\TBB\2.1\include\tbb\parallel_for.h(59) : error C2695
function1' overriding virtual function differs from 'function2' only by calling convention".
Where function1 is 'start_for
This problem confuse me. Does any reason cause this question? How should I solve it?
I'm not completely sure that this will help, but for the sake of experiment try to do the following:
And, please, write us if it helped or not.
OK, I see what was the reason of your problem. You attempt to compile your .Net app in the "/clr:pure" mode. This won't work with the native library like TBB. Use the simple "/clr" option to compile your project. (And do not forget to remove that __TBB_EXPORTED_METOD qualifier from the "parallel_for.h" you've added recently.)