[Top][All Lists]

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

Re: Linking to external static (!) library

From: TOT
Subject: Re: Linking to external static (!) library
Date: Wed, 20 Apr 2011 05:10:14 -0700 (PDT)

Thank you, Martin.

I tried it in one step: 
mkoctfile -I/path_to_my_include -I/another_path
-L/path_to_library/libname1.a -L/path_to_library/libname2.a

It gave me the same problem like you have got.

Then I used:
mkoctfile -I/path_to_my_include -I/another_path -L/path_to_library -lname1

The result was the same.

You said that with -fPIC option compilation everything worked fine.

Is there any way to connect to the static library compiled without -fPIC

I'm afraid that it's theoretically impossible because resulted oct file
should be dynamically linked to the octave - which means that it should be
assembled and linked with -shared option - which means that ALL dependences
should have PIC information - which means that they should be compiled with
-fPIC option.

Am I right? (please say me that I'm not and by recompiling octave I can get
it worked)

Maybe I can recompile octave and include my library into compilation

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]