Hi, nuliknol -
1. C++ (unlike "classic C") does NOT allow "implicit declarations". You MUST declare function "mpi_init_vars()" before you use it.
2. As ForzaItalia2006 said, you must also use "externC {}" syntax when you declare it.
3. The declaration should usually be in a header file. If you're using somebody else's library, you should already have a .h header. Otherwise, you can easily write your own:
Example header ("mympi.h"; change as appropriate):
Code:
#ifndef MY_MPI_H
#define MY_MPI_H
#ifdef __cplusplus
extern "C" {
#endif
void mpi_init_vars ();
#ifdef __cplusplus
}
#endif
#endif
/* MY_MPI_H *
It looks ugly. Heck - it IS ugly
But it should get you going!
'Hope that helps .. PSM