[so] [Tema2][Linux] extern struct

Adrian Sendroiu molecula2788 at gmail.com
Wed Apr 3 17:27:17 EEST 2013


Alex Tomescu <alex.dan.tomescu at gmail.com> writes:

> Salut,
>
> In mpi.h exista
>
> extern DECLSPEC struct mpi_comm *mpi_comm_world #define MPI_COMM_WORLD
> (mpi_comm_world)
>
> Din cate am vazut prin diferite tutoriale, daca definesc
> mpi_comm_world intr-una din surse, ar trebui sa mearga si in celelalte
> care includ mpi.h, dar cand folosesc MPI_COMM_WORLD intr-un program de
> test, da urmatoarea eroare: test.c:(.text+0x31): undefined reference
> to `mpi_comm_world'
>
> Ce ar trebui sa fac sa pot folosi MPI_COMM_WORLD definit in header?
>
> Multumesc
>
> -- Alexandru-Dan Tomescu

Salut,

Trebuie sa definesti mpi_comm_world undeva in biblioteca libsompi si sa
legi programul de test cu biblioteca respectiva.

Adrian


More information about the so mailing list