Hi Juanjo,

Sorry for being unclear!

The example sources in embed-windows.tar from the email

  - Re: [Ecls-list] Example about building / loading ECL libraries
    http://sourceforge.net/mailarchive/message.php?msg_id=30912414

(see 'embed-windows.tar',
http://sourceforge.net/mailarchive/attachment.php?list_name=ecls-list&message_id=CAMCvb%3DAZ4XtzpQ3kwc7qhjctNXTc5bhqWP0s4-cHVnhxXKf6AQ%40mail.gmail.com&counter=2)

show how to compile the files hello-lisp.asd and hello-lisp.lisp on Windows
into the static library hello-lisp.lib which than is used to build
hello.exe from hello.c.

the line

ecl -norc -load compile.lisp

in the Makefile is responsible for building the static library based on the
lisp build file compile.lisp:

=== compile.lisp ===
(ext:install-c-compiler)
(require :asdf)
(push "./" asdf:*central-registry*)
(asdf:make-build :hello-lisp :type :static-library :move-here "./")
(quit)
===

So my fist and probably naive attempt to build a shared library was to
change ':type :static-library' to ':type :shared-library' resulting in the
following file:

=== compile.lisp ===
(ext:install-c-compiler)
(require :asdf)
(push "./" asdf:*central-registry*)
(asdf:make-build :hello-lisp :type :shared-library :move-here "./")
(quit)
===

But unfortunately nothing happens when trying to use this file to build a
shared library:

$ ls -la

total 28
drwxr-xr-x 1 dietrich    0 Jan  1  1970 .
drwxr-xr-x 1 dietrich    0 Jan  1  1970 ..
-rw-r--r-- 1 dietrich  636 Jun 24 23:44 compile.lisp
-rw-r--r-- 1 dietrich  453 Jun 24 23:44 hello.c
-rw-r--r-- 1 dietrich   64 Jun 24 23:44 hello-lisp.asd
-rw-r--r-- 1 dietrich   48 Jun 24 23:44 hello-lisp.lisp
-rw-r--r-- 1 dietrich 1259 Jun 24 23:44 Makefile
-rw-r--r-- 1 dietrich  342 Jun 24 23:44 README
-rw-r--r-- 1 dietrich  528 Jun 24 23:44 vsenv

$ ./vsenv ecl.exe -norc -load compile.lisp

Setting environment for using Microsoft Visual Studio 2010 x64 tools.
;;; Loading
"E:/Users/dietrich/home/cs/lang/lisp/ecl/diary/2013/06/24/windows/dynamic-link-libraries/bastel100/v100/shared-lib/embed-windows/compile.lisp"
;;; Loading
#P"C:/Users/dietrich/home/cs/lang/lisp/ecl/64/git/install/cmp.fas"
;;; Loading
#P"C:/Users/dietrich/home/cs/lang/lisp/ecl/64/git/install/asdf.fas"

$ ls -la

total 28
drwxr-xr-x 1 dietrich    0 Jan  1  1970 .
drwxr-xr-x 1 dietrich    0 Jan  1  1970 ..
-rw-r--r-- 1 dietrich  636 Jun 24 23:44 compile.lisp
-rw-r--r-- 1 dietrich  453 Jun 24 23:44 hello.c
-rw-r--r-- 1 dietrich   64 Jun 24 23:44 hello-lisp.asd
-rw-r--r-- 1 dietrich   48 Jun 24 23:44 hello-lisp.lisp
-rw-r--r-- 1 dietrich 1259 Jun 24 23:44 Makefile
-rw-r--r-- 1 dietrich  342 Jun 24 23:44 README
-rw-r--r-- 1 dietrich  528 Jun 24 23:44 vsenv

So now I wonder what I have to do in order to build a shared library...

One approach would be to change the Makefile and / or the compile.lisp
file, but I am not sure how;

another one might be to compile the lisp files to .h, .c, .data files first
and build a shared library "by hand" using 'cl' and 'link'.

Which approach would be the better one?

Or is there some better way to solve this problem?

Thanks again,

Dietrich









On Mon, Jun 24, 2013 at 9:50 PM, Juan Jose Garcia-Ripoll <
juanjose.garciarip...@gmail.com> wrote:

>
> On Mon, Jun 24, 2013 at 2:34 PM, Dietrich Bollmann <dietr...@formgames.org
> > wrote:
>
>> Using :shared-library at the place of :static-library in the asdf:make-build
>> command seems not to be enough - at least not under Windows.
>>
>
> What does it mean "not enough". Please, be more accurate on your reports.
>
>
>
> --
> Instituto de FĂ­sica Fundamental, CSIC
> c/ Serrano, 113b, Madrid 28006 (Spain)
> http://juanjose.garciaripoll.googlepages.com
>
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
Ecls-list mailing list
Ecls-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ecls-list

Reply via email to