importing ".a" libraries

Machine-specific discussion
Unix, Linux, OS X, OS/2, Windows, ..?
Locked
harsha
Posts: 1
Joined: Sun Aug 26, 2007 9:12 pm

importing ".a" libraries

Post by harsha »

I have a precompiled library called:

cts.a

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

Jeff
Posts: 604
Joined: Sat Apr 07, 2007 2:23 pm
Location: Ohio
Contact:

Post by Jeff »

Jeff
=====
Old programmers don't die. They just parse on...

Artful code

pjot
Posts: 733
Joined: Thu Feb 26, 2004 10:19 pm
Location: The Hague, The Netherlands
Contact:

Post 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

Lutz
Posts: 5289
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California
Contact:

Post 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

Locked