public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Tony Kelman <tony@kelman.net>
To: Jose Isaias Cabrera <jicman@outlook.com>,
	"cygwin@cygwin.com"	<cygwin@cygwin.com>
Subject: Re: How to build a DLL without cygwin DLL dependencies
Date: Wed, 29 May 2019 20:18:00 -0000	[thread overview]
Message-ID: <CY4PR22MB0773A4B996F728085A569EB4A71F0@CY4PR22MB0773.namprd22.prod.outlook.com> (raw)
In-Reply-To: <DB7PR01MB5386151A2BEF700669338C94DE1F0@DB7PR01MB5386.eurprd01.prod.exchangelabs.com>

> So, I downloaded "i686-w64-mingw32-gcc" from the setup packages and ran,
> i686-w64-mingw32-gcc -shared sqlite3.c -o sqlite3.dll,
> but it still wants me to add other DLLs.  I just want to drop the
> sqlite3.dll just created in another spot and run a tool using that
> without need of any other DLL. I know I can do it with MinGW, but I
> don't want to install two systems on my computer.  I know I am missing
> something because I know other folks have done it before.
> I duckduckgo'ed some answers, but have not found anything but
> "use MinGW".  Is this even possible with cygwin and its packages?

You just did "use MinGW with cygwin and its packages." MinGW is the
compiler triple you just used via a cross compiler. The end user
system won't need cygwin, and it won't need a compiler. Would be good
if you were more specific about what "it" you're referring to and which
"other DLLs" you mean. I just tried what you described:

curl -L https://www.sqlite.org/2019/sqlite-autoconf-3280000.tar.gz | tar -xz
cd sqlite-autoconf-3280000
i686-w64-mingw32-gcc -shared sqlite3.c -o sqlite3.dll

and dependency walker is telling me there are a few dependencies on
libgcc_s_sjlj-1.dll for __divdi3 etc. That's a compiler runtime dll
and you can avoid the issue by building a 64 bit dll, or in 32 bit via

i686-w64-mingw32-gcc -shared -static-libgcc sqlite3.c -o sqlite3.dll

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2019-05-29 20:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-29 17:02 Jose Isaias Cabrera
2019-05-29 17:55 ` Tony Kelman
2019-05-29 18:27   ` Jose Isaias Cabrera
2019-05-29 20:18     ` Tony Kelman [this message]
2019-05-30  2:51       ` Jose Isaias Cabrera
2019-05-31 17:01         ` Tatsuro MATSUOKA
2019-05-31 17:14           ` Jose Isaias Cabrera
2019-05-31 18:24             ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CY4PR22MB0773A4B996F728085A569EB4A71F0@CY4PR22MB0773.namprd22.prod.outlook.com \
    --to=tony@kelman.net \
    --cc=cygwin@cygwin.com \
    --cc=jicman@outlook.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).