I have some *.cpp file which using OpenMPI. Also I have *.h file with specified to me functions (some of them) and implementation of them:
void Show(std::string s);
void ShowLine(std::string s);
void MPI_Output();
So I use these functions in my *.cpp file for example:
/*...*/
MPI_Output();
And including this header:
#include "my_h.h"
Then I'm trying to compile my frogram with mpicc:
mpicc -w my_best_program.cpp
It fails while in compilation process with following message:
/tmp/icpcBCoxCA.o: In function `main':
MPIDebug9.cpp:(.text+0xa46): undefined reference to `ShowLine(std::string)'
MPIDebug9.cpp:(.text+0xa90): undefined reference to `MPI_Output()'
MPIDebug9.cpp:(.text+0xc0f): undefined reference to `Show(std::string)'
/tmp/icpcBCoxCA.o: In function `info_main(double)':
MPIDebug9.cpp:(.text+0xe49): undefined reference to `Show(std::string)'
/tmp/icpcBCoxCA.o: In function `info(double)':
MPIDebug9.cpp:(.text+0x104e): undefined reference to `ShowLine(std::string)'
In addition, some info:
mpicc --showme:compile
-I/usr/mpi/intel/openmpi-1.4.4/include -pthread
Is there any solution for my problem?