importing ".a" libraries

Started by harsha, September 04, 2007, 04:52:58 AM

Previous topic - Next topic

harsha

I have a precompiled library called:



cts.a



does newlisp support importing of such libraries apart from

.so, .dll etc..

Jeff

#1
http://www.newlisp.org/CodePatterns.html#extending">http://www.newlisp.org/CodePatterns.html#extending
Jeff

=====

Old programmers don\'t die. They just parse on...



http://artfulcode.net\">Artful code

pjot

#2
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

Lutz

#3
Perhaps you could link the .a object to a shared library this way:


cc cts.a -shared -o cts.so

or on Mac OSX


cc cts.a -bundle -o cts.dylib

and then use it



Lutz