- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi!
I use Visual Fortran 11.1 Windows 7 64bit to build a 32bit Library that is used from C++. Everything works as expected as far as I don't activate OpenMP in the Fortran lib. Although the C++ code links against libiomp5 as suggested by the docu, I get linker error LNK2019: unresolved external symbol _omp_get_num_procs_ .
I would appreciate any advice.
Thx,
Jan
링크가 복사됨
2 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
If you have the function call omp_num_procs() in your source code, the standard way to make it go away when you compile without /Qopenmp is to make it conditional compilation:
#ifdef _OPENMP
USE omp_lib
#endif
......
#ifdef _OPENMP
np=omp_get_num_procs()
#endif
This would require the /fpp compile option be set.
#ifdef _OPENMP
USE omp_lib
#endif
......
#ifdef _OPENMP
np=omp_get_num_procs()
#endif
This would require the /fpp compile option be set.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Hi TimP,
that's what I did and as I said everything works fine without/Qopenmp. With OpenMP enabled I can compile the Fortran lib with no error. The error occurs when I link my C++ code against the Fortran lib because it can't find the OpenMP symbols although I also link against libiomp5. To make it clear: I'd like OpenMP to be enabled.
--
Jan