Hi, I'm trying to generate random numbers using status = vdrnggaussian( method, stream, n, r, a, sigma ) a call to the math library mkl_vsl.f77. I get the following compilation error: Error 1 error LNK2019: unresolved external symbol _VDRNGGAUSSIAN referenced in function _MAIN__ TM25pgm.obj Can you tell me how I can call the math library from within the program and get a stream of NORMAL/Gaussian random numbers? Thanks
Well, unresolved symbols mean the linker (it is linker error, and not a compilation error as you wrote) doesn't know where to find the function. You need to provide/define appropriate libraries. See link advisor http://software.intel.com/en-us/articles/intel-mkl-link-line-advisor/ and check which libraries you need. You may also need to specify the module(s) containing definition/interface of the function.
The other most common sources of the error are (assuming that you have provided the correct list of libraries):
The declaration of the symbol contains a spelling mistake, such
that, it is not the same name as the definition of the symbol.
function was used but the type or number of the parameters did not
match the function definition.
The calling convention (__cdecl,
differs on the use of the function declaration and the function