Thank you, Selva. After banging my head against the keyboard for the last 10 
hours, only to find out I disposed the very solution you and David suggested 
because of a minor glitch not related to libtool and automake, I finally got 
it sorted out.



Best regards,

Simon



From: Selva Nair <selva.n...@gmail.com>
Sent: Wednesday, October 10, 2018 5:55 PM
To: Simon Rozman <si...@rozman.si>
Cc: openvpn-devel <openvpn-devel@lists.sourceforge.net>
Subject: Re: [Openvpn-devel] MinGW to build DLL not EXE



HI,


I have almost finished integrating tapctl.exe and openvpnmsica.dll utilities
for MSI packaging into the OpenVPN/openvpn repo. However, I am totally new
with MinGW and would need some help.

How do you tell the OpenVPN's build process to create a DLL file, not an
EXE?



As with gcc mingw takes -shared option to create dll. But I guess you want to 
use autotools. If so:

In configure.ac <http://configure.ac>  add "LT_INIT([win32-dll])" and a 
barebones Makefile.am would be

lib_LTLIBRARIES = libtest.la <http://libtest.la>
libtest_la_LDFLAGS = -no-undefined -avoid-version
libtest_la_SOURCES = test.c
libtest_la_CFLAGS = --std=c99

Run autoreconf -iv; ./configure; make and will produce libtest.dll in ./.libs/

I believe all symbols are exported by default. Adding "-export-symbols 
symbol-file"

may be an easy way to customize it.

Selva



Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________
Openvpn-devel mailing list
Openvpn-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openvpn-devel

Reply via email to