delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/31/09:51:05

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
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)" <extern DOT thomas DOT pasch AT volkswagen DOT de>
To: "'Dmitry Timoshkov'" <dmitry AT baikal DOT ru>,
"Pasch, Thomas (ACTGRO)"
<extern DOT thomas DOT pasch AT volkswagen DOT de>
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)

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019