[so] [Tema2][Linux] extern struct

Alex Tomescu alex.dan.tomescu at gmail.com
Wed Apr 3 17:40:11 EEST 2013


2013/4/3 Adrian Sendroiu <molecula2788 at gmail.com>:
> 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
> _______________________________________________
> http://ocw.cs.pub.ro/courses/so/info/lista-discutii

L-am definit in mpi.c care este in libsompi. Also am o problema cu
makefile-ul pe vmchecker. Am incercat si cu biblioteca libsompi in
arhiva, si fara ea (compilata prin makefile) si tot primesc

/usr/bin/ld: skipping incompatible ../libsompi.so when searching for -lsompi
/usr/bin/ld: cannot find -lsompi

PS: M-am gandit ca nu are rost sa mai deschid un topic si pentru
problema cu makefile :)

--
Alexandru-Dan Tomescu


More information about the so mailing list