- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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
- Marcas:
- Intel® Fortran Compiler
Link copiado
2 Respostas
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
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
Responder
Opções do tópico
- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora