Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

From: Chaloupka Zdenìk (chaloupka_at_[hidden])
Date: 2007-05-03 07:57:27


Hello,
I tried to compile following code:

#include <stdio.h>
#include "mpi.h"
int main(int argv, char *argc[])
{
    int rank;

    MPI_Init(&argv, &argc);
    MPI_Comm_rank(MPI_COMM_WORLD, &rank);
    if (rank == 0) printf("Starting program\n");
    printf("Pocet vstupnich parametru: %d a argumenty: %s\n", argv, *argc);
    MPI_Finalize();
    return 0;
}

and I get this error as an output:

[chaloz_at_chaloupka src]$ mpicc main.cc
/tmp/ccBJb7ZI.o: In function
`__static_initialization_and_destruction_0(int,
int)':main.cc:(.text+0x23): undefined reference to
`std::ios_base::Init::Init()'
/tmp/ccBJb7ZI.o: In function `__tcf_0':main.cc:(.text+0x66): undefined
reference to `std::ios_base::Init::~Init()'
/tmp/ccBJb7ZI.o: In function
`MPI::Intracomm::convert_info_to_mpi_info(int, MPI::Info
const*)':main.cc:(.text._ZN3MPI9Intracomm24convert_info_to_mpi_infoEiPKNS_4InfoE[MPI::Intracomm::convert_info_to_mpi_info(int,

MPI::Info const*)]+0x1e): undefined reference to `operator
new[](unsigned long)'
/tmp/ccBJb7ZI.o: In function `MPI::Datatype::Get_contents(int, int, int,
int*, long*, MPI::Datatype*)
const':main.cc:(.text._ZNK3MPI8Datatype12Get_contentsEiiiPiPlPS0_[MPI::Datatype::Get_contents(int,

int, int, int*, long*, MPI::Datatype*) const]+0x2b): undefined reference
to `operator new[](unsigned long)'
:main.cc:(.text._ZNK3MPI8Datatype12Get_contentsEiiiPiPlPS0_[MPI::Datatype::Get_contents(int,

int, int, int*, long*, MPI::Datatype*) const]+0xb0): undefined reference
to `operator delete[](void*)'

and so on, it is much more longer. Has anyone idea what's wrong?

MrCarlos