delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/05/29/22:51:45

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:mime-version:content-type
:content-transfer-encoding; q=dns; s=default; b=jBVa/UmUCm1xAcWg
pF6SjNQDF48SUMsANXYzFOtlR9coQMruPvAEOtyLeoOpJPK2KoFb/qaex0ltk/Ol
krTII/QVfHtY001a1oY8Z8r/iap6C1ezh9kPwkQS/iex498kNAOJJYRzNm60DcGM
zAiHP7pGBmS4oj5261FyqqlXULA=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:from:to:subject:date:message-id:references
:in-reply-to:mime-version:content-type
:content-transfer-encoding; s=default; bh=vozyb3ghPXk2bQZUE2sgYR
avFxY=; b=Tub+KMgicU+GGZ5ZlIBzuaUwEUSBnxYZj/ZCp9fFS/a9v6jRVIOhyn
OZW8bYqtfcUbtC9sBIE/oyFI0i49MsdlfyDq9cHX3x541JZNgRTUc/Ut6P1pZSRo
eXhkST0kkB1giBkgio6odqNTD3lwgkf27ETCIX4WPdOFVwfX4YPGE=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy=H*c:sk:HMHPRHH, H*c:alternative, H*c:HHH
X-HELO: EUR02-AM5-obe.outbound.protection.outlook.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yKBBT1fdEyfuqJ/Z44TG/SQtzpdaW+8O9K35dgycscg=; b=mNYxiuz+wLQUwFOYxRUxkIrVbWD7nnIQ1FhkUBzsYNXug1euOOoX8X4cNGk6CT4BxZAQmQeia9KdheN/EKXuSDE7aPCyxdyPNGl/tTQ5NvMzxBJBQPEq/hyZ0n+w9pKA8mDmZAQU/JkliG1iyfMsjwNiJEACSM1ptuJkAgoTr+zrLR001l3zy1Ezvk2I/KQI6GrhbyfnV8EoaVXXL6BVrvGF7wr+aeKBbqsaUFrPdN9tib0v4tju+dmJrau9GqpuBT3YgwovcPE8bv0AZEi8HFsEEtTyUz5R0Ywx6+WQdjXOyPXtj6xXNbfG5LjBhOhDRINXk88yRQ2W9hJNczQN+g==
From: Jose Isaias Cabrera <jicman AT outlook DOT com>
To: Tony Kelman <tony AT kelman DOT net>, "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: Re: How to build a DLL without cygwin DLL dependencies
Date: Thu, 30 May 2019 02:51:28 +0000
Message-ID: <AM0PR01MB5377DDC6AE970F5742556FC9DE180@AM0PR01MB5377.eurprd01.prod.exchangelabs.com>
References: <DB7PR01MB5386F8869A992304E8979E4DDE1F0 AT DB7PR01MB5386 DOT eurprd01 DOT prod DOT exchangelabs DOT com>,<CY4PR22MB0773AD002D202CE1D084A227A71F0 AT CY4PR22MB0773 DOT namprd22 DOT prod DOT outlook DOT com>,<DB7PR01MB5386151A2BEF700669338C94DE1F0 AT DB7PR01MB5386 DOT eurprd01 DOT prod DOT exchangelabs DOT com>,<CY4PR22MB0773A4B996F728085A569EB4A71F0 AT CY4PR22MB0773 DOT namprd22 DOT prod DOT outlook DOT com>
In-Reply-To: <CY4PR22MB0773A4B996F728085A569EB4A71F0@CY4PR22MB0773.namprd22.prod.outlook.com>
MIME-Version: 1.0
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id x4U2piwv006479

Tony Kelman, on Wednesday, May 29, 2019 04:18 PM, wrote...
>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
>

This is what I needed above. The command I was using,

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

will create a DLL, but it will have dependencies on some cygwin libs.  This command,

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

creates a DLL with no dependencies.  So, the option -static-libgcc is what I needed.  Thanks.

To summarize, when creating SQLite3 DLL or building any SQLite3 tools with cygwin,
1. Download the i686-w65-mingw32-gcc compiler with the setup tools (the 64 bit)
2. Get the source from sqlite.org
3. untar source
4. cd to the source directory
5. run this command:
i686-w64-mingw32-gcc -shared -static-libgcc sqlite3.c -o sqlite3.dll

Thanks,

josé

--
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


- Raw text -


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