From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by sourceware.org (Postfix) with ESMTPS id 80DD63858D20 for ; Fri, 2 Dec 2022 21:37:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 80DD63858D20 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=oskog97.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=oskog97.com Received: (Authenticated sender: oskar@oskog97.com) by mail.gandi.net (Postfix) with ESMTPSA id ADBE6100005 for ; Fri, 2 Dec 2022 21:37:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oskog97.com; s=gm1; t=1670017041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hBiVze7U2PRfQIfyfxvcMwOExj+sbKUNBEag5vjKrnU=; b=CTrLT/v5PzhMLotwXfv3hhL1TbG7QbssaQduudIbKNx1l/N/mfdmFEbVOot3vTGwVX8JSW 9IN/YwHkMjLZsJ3iCOUK/Y79hlN2Q91zSph2neMrKoPDAQarFS+mYquySH704xT4jnOIIo wNMi2aO8+BjXhGukPqdU+XyTfvSXeRPvi1NaZkHRPKFUTwHOdA0h/n6/l8KKSfiQsmSCZT WweAwpwlTv4GJFSYkJ+6jlDCXwsGitsUS+DgeS3fpa6hnaIqFG0LluPJWLpju5kkF46BwH jQ/15w1mIPIUZW/jbtw+9tiPGgjI4WwLY+pe4W/S9v449H3INpjp38U7r0Z+Cw== Message-ID: Date: Fri, 2 Dec 2022 23:37:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: Building SQLite3 CLI without Content-Language: en-US To: cygwin@cygwin.com References: From: Oskar Skog In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 2022-12-02 22:37, Jose Isaias Cabrera via Cygwin wrote: > > Greetings and salutations! > > I can build SQLite DLL and use it under Windows without any problem using this command: > > i686-w64-mingw32-gcc -shared -static-libgcc sqlite3.c -o sqlite3.dll > > And I can use that DLL outside cygwin without any problem. I can also build the SQLite3.exe tool using this command: > > i686-w64-mingw32-gcc -shared -static-libgcc shell.c -o sqlite3.exe > > The problem is that when I run this sqlite3.exe outside the cygwin environment, it gives me the error: > > "The code execution cannot proceed because cygwin1.dll was > not found. Reinstalling the program may fix this problem." > > Is there an option that I can do to build the tool without the need of the cygwin1.dll? I know that I can move the file in the same spot, but I want to create it without the need of it. Thanks for your support. > > josé > https://cygwin.com/faq/faq.html#faq.programming.static-linking "No. If your program uses the Cygwin API, then your executable cannot run without cygwin1.dll. In particular, it is not possible to statically link with a Cygwin library to obtain an independent, self-contained executable."