This is the mail archive of the
mailing list for the Cygwin project.
little help with dll
- From: "jim" <jamesmc at localnet dot com>
- To: <cygwin at cygwin dot com>
- Date: Tue, 21 Oct 2003 11:52:22 -0400
- Subject: little help with dll
i'm a newbie trying to create a dll for cygwin with gcc mingw for swig so i
can convert c++ into a tcl module. $LIBS and $LIBPATH are 2 settings that i
dont where/what to specify.
is this quote true also?
"Note that if you build your DLL as a Cygwin-linked DLL, you should really
load it from a Cygwin-linked Tcl/Tk shell as well to avoid certain
problems. If you're using Cygwin b20.x, it already comes with tclsh/wish
etc, and it's a non-issue then."
below is documentation from swig tutorial to help clarify
any input/examples and links you can provide to help me come up with a
solution would be great.
thank you, marvin
Q: How do I create DLLs using Cygwin?
When creating DLLs in Windows there cannot be any unresolved symbols. Thus
all the libraries you need to link against must be specified using the -l
commandline option. Most of the SWIG target languages will need linking
against the language library. In general use:
$ gcc -c $SRCS
$ gcc -shared $OBJS $LIBPATH $LIBS -o module.dll
$ c++ -c $SRCS
$ c++ -shared $OBJS $LIBPATH $LIBS -o module.dll
$SRCS: C/C++ sources
$OBJS: compiled .o files
$LIBPATH: Path to language library, e.g. -L/usr/lib/python2.2/config. Use
the path to the .a file in preference to the .dll file.
$LIBS: Language library, e.g. -lpython2.2
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html