3

I've installed MS-MPIv5 from Microsoft and also the debugger for msmpi. In proejct properties in VS2012, I've changed C/C++ -> Additional include libraries adding "$(MSMPI_INC); $(MSMPI_INC)\x64" and also Linker -> All options->Additional Dependencies adding "msmpi.lib;", but VS is still giving me al lot of linker errors such as

error LNK2019: unresolved external symbol _MPI_Barrier@4

unresolved external symbol _MPI_Bcast@20

and so on, with all the mpi functions or type of variables. Is there something I forgot to change or add?

Usr
  • 2,628
  • 10
  • 51
  • 91
  • possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Ken White Apr 22 '15 at 16:57
  • 1
    Did the installer set the MSMPI_INC environment variable? Have you tried using an absolute reference to msmpi.lib? – Guvante Apr 22 '15 at 17:05

2 Answers2

0

I haven't used 2012, but if it's similar to the older versions of VS then this detailed link may help. In general make sure to do these 3 things:

  1. Add the "Additional Include Directories"
  2. Add the "Additional Library Directories"
  3. Add the "Additional Dependencies" (msimpi.lib)

It sounds like you may be missing the 2nd step?

MasterHD
  • 2,264
  • 1
  • 32
  • 41
  • 1
    Thank you, I followed the guide and it worked; so, it does work for VS2012. What I was missing was adding the path where the SDK's files where installed. – Usr Apr 26 '15 at 18:27
0

Try $(MSMPI_INC)x64 (no \) In my PC

MSMPI_INC=C:\Program Files (x86)\Microsoft SDKs\MPI\Include\
Ivan Farkas
  • 351
  • 1
  • 4
  • 10