help-octave
[Top][All Lists]
Advanced

[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 testoct.cc

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
-lname2 testoct.cc

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
option?

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
process?

-----
Back to the future!
--
View this message in context: 
http://octave.1599824.n4.nabble.com/Linking-to-external-static-library-tp3461005p3462819.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

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