Open MPI logo

Open MPI User's Mailing List Archives

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

From: Caird, Andrew J (acaird_at_[hidden])
Date: 2006-06-15 17:22:22


Anoop,

OpenMPI defaults to building only shared libraries; see this FAQ entry
for building static libraries:

http://www.open-mpi.org/faq/?category=building#static-build

Hope this helps.
--andy
  

> -----Original Message-----
> From: users-bounces_at_[hidden]
> [mailto:users-bounces_at_[hidden]] On Behalf Of Anoop Rajendra
> Sent: Thursday, June 15, 2006 4:56 PM
> To: users_at_[hidden]
> Subject: [OMPI users] Cannot link statically against OpenMPI programs
>
> Hi.
>
> I'm having trouble compiling applications to link statically
>
> The command line and error I receive is
>
> [root_at_Pebble-anoop examples]# mpicc -c cpi.c
> [root_at_Pebble-anoop examples]# mpicc -static -o cpi cpi.o
> /usr/bin/ld: cannot find -lmpi
> collect2: ld returned 1 exit status
>
> Not sure how I can compile an application statically. Can
> someone help?
>
> Thanks,
> Anoop
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>