Page 1 of 1

importing ".a" libraries

Posted: Tue Sep 04, 2007 11:52 am
by harsha
I have a precompiled library called:

cts.a

does newlisp support importing of such libraries apart from
.so, .dll etc..

Posted: Tue Sep 04, 2007 12:03 pm
by Jeff

Posted: Thu Sep 06, 2007 6:14 pm
by pjot
Hi,

NewLisp does not support such static libraries, as the call to import a library is 'dlopen' (Unix) or 'LoadLibrary' (Win32). The call 'dlopen' literally means 'Dynamic Library open'.

As far as I know there is no possibility at all to import static libs.

Regards
Peter

Posted: Thu Sep 06, 2007 6:53 pm
by Lutz
Perhaps you could link the .a object to a shared library this way:

Code: Select all

cc cts.a -shared -o cts.so
or on Mac OSX

Code: Select all

cc cts.a -bundle -o cts.dylib
and then use it

Lutz