From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 103673 invoked by alias); 29 May 2019 20:18:56 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 103666 invoked by uid 89); 29 May 2019 20:18:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: NAM02-CY1-obe.outbound.protection.outlook.com Received: from mail-oln040092004025.outbound.protection.outlook.com (HELO NAM02-CY1-obe.outbound.protection.outlook.com) (40.92.4.25) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 29 May 2019 20:18:54 +0000 Received: from SN1NAM02FT009.eop-nam02.prod.protection.outlook.com (10.152.72.53) by SN1NAM02HT172.eop-nam02.prod.protection.outlook.com (10.152.73.181) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1922.16; Wed, 29 May 2019 20:18:52 +0000 Received: from CY4PR22MB0773.namprd22.prod.outlook.com (10.152.72.60) by SN1NAM02FT009.mail.protection.outlook.com (10.152.73.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1922.16 via Frontend Transport; Wed, 29 May 2019 20:18:52 +0000 Received: from CY4PR22MB0773.namprd22.prod.outlook.com ([fe80::b921:c178:1d9b:4607]) by CY4PR22MB0773.namprd22.prod.outlook.com ([fe80::b921:c178:1d9b:4607%5]) with mapi id 15.20.1922.021; Wed, 29 May 2019 20:18:52 +0000 From: Tony Kelman To: Jose Isaias Cabrera , "cygwin@cygwin.com" Subject: Re: How to build a DLL without cygwin DLL dependencies Date: Wed, 29 May 2019 20:18:00 -0000 Message-ID: References: ,, In-Reply-To: x-ms-exchange-purlcount: 1 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-IsSubscribed: yes X-SW-Source: 2019-05/txt/msg00254.txt.bz2 > 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. =A0I 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. =A0I know I am missing > something because I know other folks have done it before. >=A0I duckduckgo'ed some answers, but have not found anything but > "use MinGW". =A0Is 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