[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Linking to external static (!) library

From: TOT
Subject: Linking to external static (!) library
Date: Tue, 19 Apr 2011 10:23:53 -0700 (PDT)

Hi everyone.
There is a big static C library (several lib*.a files). It contains
references to MPI library (I'm not sure how)
There is one header file (c*.h), containing several other header files and
so on.
This library compiled using gcc (compatible with octave).

Lets assume that in the library "myopen" function exists. I want to call it
in the octave and return the value of it (say 1 if everything is OK and -1
on error).

I'm tying to use OCT files, but I end up with an error from ld: "recompile
with -fPIC".
The library is huge, makefiles are huge and -fPIC option to be placed in too
many places, so I don't want to do this.

Two questions:

Is there any way to link to this library (via tweaking mkoctfile or by other
means, but not recompiling the library)?

Is it the same for matlab?


Back to the future!
View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

[Prev in Thread] Current Thread [Next in Thread]