[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to build a .dll on cygwin?

From: Carlo Wood
Subject: How to build a .dll on cygwin?
Date: Fri, 2 Jul 2004 01:45:07 +0200
User-agent: Mutt/1.4.1i


I am trying several days now to build a .dll on cygwin.
But it only wants to build a static library :(.

What am I doing wrong?

Here is what happens, this is supposed to create a dll:

$ make
if /bin/bash ./libtool --mode=compile g++ -DHAVE_CONFIG_H  -I./include 
-I./include   -g -pipe -Wall -Woverloaded-virtual -Wundef -Wpointer-arith 
-Wwrite-strings -Werror -Winline  -MT libcw_la-version.lo -MD -MP -MF 
".deps/libcw_la-version.Tpo" \
  -c -o libcw_la-version.lo `test -f '' || echo './'`; \
then mv -f ".deps/libcw_la-version.Tpo" ".deps/libcw_la-version.Plo"; \
else rm -f ".deps/libcw_la-version.Tpo"; exit 1; \
 g++ -DHAVE_CONFIG_H -I./include -I./include -g -pipe -Wall 
-Woverloaded-virtual -Wundef -Wpointer-arith -Wwrite-strings -Werror -Winline 
-MT libcw_la-version.lo -MD -MP -MF .deps/libcw_la-version.Tpo -c  
-DPIC -o .libs/libcw_la-version.o

 comment: the above is correctly creating a pic-object; after all - we are 
 to create a dll.  Note that this results in the following lines in the
 created libcw_la-version.lo file:

/bin/bash ./libtool --mode=link g++     -o -rpath /usr/local/lib 
-version-info 0:0:0 libcw_la-version.lo llists/ 
crosslink/ io/ kernel/ net/

 comment: this seems correct too no?  .la as output, .lo and .la as input

libtool: link: warning: undefined symbols not allowed in i686-pc-cygwin shared 

 What is this?  Of course I have undefined symbols: the ones of libc and 
libstdc++ ?!

rm -fr  .libs/libcw.a .libs/ .libs/libcw.lai
rm -fr .libs/libcw.lax
mkdir .libs/libcw.lax
rm -fr .libs/libcw.lax/libllists.a
mkdir .libs/libcw.lax/libllists.a
(cd .libs/libcw.lax/libllists.a && ar x /usr/src/libcw/llists/.libs/libllists.a)
rm -fr .libs/libcw.lax/libcrosslink.a
mkdir .libs/libcw.lax/libcrosslink.a
(cd .libs/libcw.lax/libcrosslink.a && ar x 
rm -fr .libs/libcw.lax/libio.a
mkdir .libs/libcw.lax/libio.a
(cd .libs/libcw.lax/libio.a && ar x /usr/src/libcw/io/.libs/libio.a)
rm -fr .libs/libcw.lax/libkernel.a
mkdir .libs/libcw.lax/libkernel.a
(cd .libs/libcw.lax/libkernel.a && ar x /usr/src/libcw/kernel/.libs/libkernel.a)
rm -fr .libs/libcw.lax/libnet.a
mkdir .libs/libcw.lax/libnet.a
(cd .libs/libcw.lax/libnet.a && ar x /usr/src/libcw/net/.libs/libnet.a)
ar cru .libs/libcw.a  .libs/libcw.lax/libllists.a/cbll.o 
.libs/libcw.lax/libllists.a/expire.o .libs/libcw.lax/libllists.a/sbll.o  
.libs/libcw.lax/libio.a/dbstreambuf.o .libs/libcw.lax/libio.a/file.o 
.libs/libcw.lax/libio.a/pipe.o .libs/libcw.lax/libio.a/sock.o 
.libs/libcw.lax/libio.a/traits.o  .libs/libcw.lax/libkernel.a/debugdaemon.o 
.libs/libcw.lax/libkernel.a/events.o .libs/libcw.lax/libkernel.a/execve.o 
.libs/libcw.lax/libkernel.a/libcw_app.o .libs/libcw.lax/libkernel.a/memleak.o 
.libs/libcw.lax/libkernel.a/select.o .libs/libcw.lax/libkernel.a/signals.o 
.libs/libcw.lax/libkernel.a/support.o .libs/libcw.lax/libkernel.a/timing.o  
ranlib .libs/libcw.a
rm -fr .libs/libcw.lax
(cd .libs && rm -f && ln -s ../

Ok, I am totally lost ...
Why does it suddenly create a .libs/libcw.a ?
Where is the .dll?

Also, this *.a is not usable because the libcw_la-version.lo is NOT linked in:
that only refers to a pic-object, not a non-pic-object.  The result is a
useless (broken) static library.

Can someone please tell me what I am doing wrong?
I suppose you need more info, but I don't know what :)

Carlo Wood <address@hidden>

reply via email to

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