everybody! I want to work with some mpi.h library in visual studio c++ 2010, but when i call function of the library, for example MPI_Init(), it gives me "error LNK2019 unresolved external symbol". In addition, compiler do not give the error on #include . How to fix this error?
Asked
Active
Viewed 293 times
0
-
Have you linked your .lib file using #pragma comment or project settings (linker->input) ? – CreativeMind Jan 22 '15 at 12:21
-
@Pavel You are doing `#include
`? – Jonathan Mee Jan 22 '15 at 12:21 -
I add msmpi.lib to the linker->include->additional dependencies – Pavel Jan 22 '15 at 12:24
-
@Pavel linker->include? – Luchian Grigore Jan 22 '15 at 12:25
-
Yes i included mpi.h of course. – Pavel Jan 22 '15 at 12:26
-
i think linker->input – Pavel Jan 22 '15 at 12:29
-
i add #pragma comment(lib, "msmpi"), it doesnt work – Pavel Jan 22 '15 at 12:38
-
@Pavel Does it give same error? – CreativeMind Jan 22 '15 at 12:42
-
Error is the same, as it was, i.e. "error LNK2019 unresolved external symbol" – Pavel Jan 22 '15 at 13:05
1 Answers
0
Please follow steps in below link:
http://blogs.msdn.com/b/hpctrekker/archive/2009/06/26/examples-of-linking-in-msmpi-library.aspx

CreativeMind
- 897
- 6
- 19
-
This link is helpful, however the post would be more valuable if you could paste the pertinent text in your answer as well. – Jonathan Mee Jan 22 '15 at 12:34
-
Thank you for the link, it is very useful, but nothing helps. May be it is compatibility problem, or something else - I don't know. I am gonna reinstall visual studio, hpc and all this staff again, may be it would help. – Pavel Jan 22 '15 at 14:49