DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 551M7JIX2468644 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 551M7JIX2468644 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=N1MmxFXj X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D2696385842C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1748815638; bh=leVpiyJNYgyKPAdmJ1RflAFUeQCbcKOi8vADbbARmks=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=N1MmxFXjOKOTfib072DScatzedmj+k+pCYRWMfinqxIoDvLSRpH7bQAqWUoAH2W6T o+Uhx2WTqBwX3cn5Ly9+uzQhLupOnwTmb51IRgeGqn0WI4ESx210/lxBUPM6zDu9fp Ti9Xj/W5+hzej2lSrxKgLxjgmLc8C+45k+OMft0s= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B5EF63858C62 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B5EF63858C62 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1748815614; cv=none; b=TMwns9PXmnxmOxQtbGw7+cuuXEFvv+EaPxYf/oElbwfu7a133PoioUuyi3jiRglKnHuzzWU9ReSVL2QYKEnaNivDB9PgMKrJQJh3pl6D9V3znlVvHNiwJQbdU9S7wzhD5QqZ0Il1nDDZJeval4Rjbhgv5B+Z74fZ626GtOtlugs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1748815614; c=relaxed/simple; bh=cwTLRDiR6hvR9GTwLquadJ4JJ6I2lfJFbz7kB+LUOGE=; h=Message-ID:Date:MIME-Version:From:Subject:To:DKIM-Signature; b=DuFXalUTRKpCVPqf8PZgcoPMiuDE1xFIMyXCDYvfoVVMocILUfupiS6TMBR2+doQxxiZxP2t9qN2NV31wFe7pZk5A9uuZk4QgWHzm3/buR8Joc0fflq/ge62KoOLjixQQd4gBz5UFdPs/AzVlltkG4HyI2cK2kFCWB04fP3fvyU= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B5EF63858C62 Message-ID: <1d862b75-bd5d-4456-9533-9546bd6adf9f@SystematicSW.ab.ca> Date: Sun, 1 Jun 2025 16:06:51 -0600 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Compile as DOS application? Content-Language: en-CA To: cygwin AT cygwin DOT com References: <20250531090010 DOT ef1726d9646216cdca8751c6 AT nifty DOT ne DOT jp> <20250531093328 DOT bbbc7535e942273e2344ca9f AT nifty DOT ne DOT jp> <4e0a50e9-4465-4916-8cef-efa2b0ad9356 AT dronecode DOT org DOT uk> Organization: Systematic Software In-Reply-To: X-Rspamd-Queue-Id: DBA032002D X-Rspamd-Server: rspamout08 X-Stat-Signature: uhb1a4636ymi7kka8unhg15owja5dgg6 X-Session-Marker: 427269616E2E496E676C69734053797374656D6174696353572E61622E6361 X-Session-ID: U2FsdGVkX1/Td12rYn9NtiX/9GkqwqaxbIQ5nb57kdA= X-HE-Tag: 1748815612-111846 X-HE-Meta: U2FsdGVkX1+ygYujeLLr5wPHgPhSBxxvIlQwUFPF9LPHyVqJc06n/OeQS8zifddqZU6Q2WXSuP8su1wx5Bv8Zj3FSMz+fUxWNVCOOE6bRBqVy51w4Ria8g+hTBc5Ytt6wJ0Fhy3cbiLpjVC8mBCA8r8I1qD7cErBBew3ZdncG7JvwqH96uxLj1h9ADVBRDkONwsAXu6QBFnDRzis5jH9byPm3pZrkQ4uvAFLhoSwBC8j1FA7fIOPpIxT1SQh8XyIB+zxn9YDHcJEtCeUcIpwJNdVa3RIDwW4yLjNfEuhPNAOSagHsjAcSasNSRj8utIElDS0ptBZGgo87FcyrHhOQih2UZj2+YWDVGWx7LJTAdv75zdlYOr5/Rl92meEvcenJbHxySi3+jBl3dbthbajA9H0/rj5AovBZAVA5GRnJ7sdV83mCX8OH13BI6RdccqwoAYlKcOdff6UE9lMgMdw6+LhVvo+IKfZ X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Brian Inglis via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Brian Inglis Content-Type: text/plain; charset="utf-8"; Format="flowed" Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by delorie.com id 551M7JIX2468644 On 2025-06-01 10:47, Eric J Korpela via Cygwin wrote: > To be more explicit, a text mode windows program is not a DOS program. It > will do anything useful on a DOS system without windows. > > If you desire 32-bit protected mode DOS programs, DJGPP may be your best > option. New builds of DJGPP are available at http://www.delorie.com/djgpp/ > . I'm not sure if the current binaries run correctly under cygwin as they > are programs that run under a DOS extender. They used to work under > Windows and OS/2, but it's been a while since I tried them on a recent > version of Windows. Cygwin DJGPP compilers: 5.4.0-1 djgpp-gcc-ada 5.4.0-1 djgpp-gcc-core 5.4.0-1 djgpp-gcc-debuginfo 5.4.0-1 djgpp-gcc-fortran 5.4.0-1 djgpp-gcc-g++ 5.4.0-1 djgpp-gcc-objc 5.4.0-1 djgpp-gcc-objc++ Cygwin DJGPP build utilities: 2.25-2 djgpp-binutils 2.25-2 djgpp-binutils-debuginfo Cygwin DJGPP DOS Extender: 2.05-1 djgpp-runtime IIRC DJGPP developers all ran under Windows and the programs were compatible with Windows DOS extender (which may no longer be supported). DJGPP also supports Unix cross-builds to DOS. > If you need 16-bit real mode or 16-bit protected mode DOS binaries, > OpenWatcom is an option. (It can also do 32-bit binaries, but if you are > compiling code meant for GCC, DJGPP may be the better option). You can > find it at https://github.com/open-watcom/open-watcom-v2 . OpenWatcom is > included in distributions of FreeDOS. Open/Watcom were competitors for Turbo C/Borland CPP etc. but both offered little in way of POSIX support compared to DJGPP, where we tried to keep up with functionality required by supported GNU packages and applications, although there is support for only a few core GNU and other *libraries*. IIRC DJGPP also provided Watcom compilers. https://www.delorie.com/djgpp/doc/ug/compiling/portother.html Start with: https://www.delorie.com/djgpp/zip-picker.cgi > On Sat, May 31, 2025 at 10:50 AM Lee via Cygwin wrote: >> On Sat, May 31, 2025 at 11:16 AM Jon Turney via Cygwin wrote: >>> On 31/05/2025 01:33, Takashi Yano via Cygwin wrote: >>>> On Sat, 31 May 2025 09:00:10 +0900, Takashi Yano wrote: >>>>> On Sat, 31 May 2025 00:39:24 +0200, Dan Shelton wrote: >>>>>> Does Cygwin have a compiler which allows compiling ISO C applications >>>>>> as DOS *.exe? >>> Actually, we do have a package for an (old) version of djgpp, which I >>> believe targets DOS executables. >> At this point I'm pretty much a cargo-cult programmer, but for >> whatever it's worth >> i686-w64-mingw32-gcc >> will build a non-gui *.exe program - which is a dos program, yes? >> and for a windows program: >> if test $target_type = mingw; then >> WIN_ONLY= >> CFLAGS="$CFLAGS -DWINVER=0x501" >> SPECIAL_CFLAGS="-mwindows" >> dnl from the cygwin FAQ: The regular setup allows you to use the >> -mwindows option >> dnl to include a set of the basic libraries user32, gdi32 and comdlg32. >> dnl (and also make your program a GUI program instead of a console program) >> PTHREAD_LIB=-lpthread >> echo "Using mingw32 (Win32 GUI)" >> else -- Take care. Thanks, Brian Inglis Calgary, Alberta, Canada La perfection est atteinte Perfection is achieved non pas lorsqu'il n'y a plus rien à ajouter not when there is no more to add mais lorsqu'il n'y a plus rien à retrancher but when there is no more to cut -- Antoine de Saint-Exupéry -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple