Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <96C14D00FA99D311A8D60008C791F36409826845@devwagwodx0009.wob.vw.de> From: "Pasch, Thomas (ACTGRO)" To: "'Dmitry Timoshkov'" , "Pasch, Thomas (ACTGRO)" Cc: cygwin AT cygwin DOT com Subject: RE: Symbol in DLL begin with _ Date: Tue, 31 Jul 2001 15:49:06 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain Well, Apparently you don't use stdcall (WINAPI) decorated function names. In that case all that magic with -k,--kill-at,--enable-stdcall-fixup, --add-stdcall-alias can be completely eliminated. You are right, no stdcall or MS Windows calls at the moment, only plain Standard C++. You are wrong. I could use the attached script as well. But it will not work without ---add-stdcall-alias on my NT 4.0 system. Cheers, Thomas ----------------------------------------------------- #!/bin/bash # mkdll.sh LIBNAME OBJECTFILES # LIBNAME: without extensions # OBJECTFILES: *.o (with extensions) if test $# -lt 2; then echo "usage: mkdll.sh LIBNAME OBJECTS*" exit -1 fi # additional libs to link with: here we are doing C++ stuff export LIBS=-lstdc++ export LIBNAME=$1 shift # based on a tip of Dmitry Timoshkov # zero, remove old dll rm $LIBNAME.a $LIBNAME.dll $LIBNAME.def $LIBNAME.tmp 2>/dev/null # first, get a EXPORT list dlltool --add-stdcall-alias --export-all-symbols --output-def $LIBNAME.tmp $* # (JNI only): second, only let the 'Java_' symbols in echo EXPORTS >$LIBNAME.def grep "Java_" $LIBNAME.tmp >>$LIBNAME.def # third, create the .dll dllwrap -o $LIBNAME.dll $* $LIBS --def $LIBNAME.def -Wl # forth, reorganize the .a lib dlltool --input-def $LIBNAME.def --output-lib lib$LIBNAME.a # fifth, echo something helpful about the dependencies of the dll cygcheck -rv $LIBNAME.dll -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/