- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to add some openmp to my existing code, which is a mix of fortran and C. The OPENMP calls will all be from fortran routins. I have tired to add /Qopenmp-lib:compat under Properties->Linker->Command Line but i still get:
Error 3 error LNK2019: unresolved external symbol _OMP_SET_NUM_THREADS referenced in function _MAIN__ main.obj
at the first occurance of and openmp call.
What do I have to do in the compile/link parameters??
thanks,
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi mhovers,
You do not typically need to specify /Qopenmp-lib:compat for mixed Fortran and C code unless you are mixing OpenMP code from Intel and Native compilers in the same application. In addition, that command line argument is already the default in the version 11 compilers and beyond.
As Steve Lionel says below, the important switch you need is /Qopenmp. That switch is necessary to link in the OpenMP run-time library called libiomp5.dll. I hope this helps.
- Grant
![](/skins/images/98E68944C1FF703B8AC50091329B92AF/responsive_peak/images/icon_anonymous_message.png)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page