delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Original-To: | cygwin AT cygwin DOT com |
Delivered-To: | cygwin AT cygwin DOT com |
DMARC-Filter: | OpenDMARC Filter v1.3.2 sourceware.org EC7EC3851C06 |
Authentication-Results: | sourceware.org; dmarc=none (p=none dis=none) |
header.from=SystematicSw.ab.ca | |
Authentication-Results: | sourceware.org; |
spf=none smtp.mailfrom=brian DOT inglis AT systematicsw DOT ab DOT ca | |
X-Authority-Analysis: | v=2.3 cv=LKf9vKe9 c=1 sm=1 tr=0 |
a=kiZT5GMN3KAWqtYcXc+/4Q==:117 a=kiZT5GMN3KAWqtYcXc+/4Q==:17 | |
a=IkcTkHD0fZMA:10 a=w_pzkKWiAAAA:8 a=oSuH_FOv-Y10M8My5SwA:9 a=QEXdDO2ut3YA:10 | |
a=9c8rtzwoRDUA:10 a=sRI3_1zDfAgwuvI8zelB:22 | |
Subject: | Re: Using cygwin-dll with msvc-exe |
To: | cygwin AT cygwin DOT com |
References: | <00a401d64b9c$9958e6d0$cc0ab470$@gmail.com> |
<56b93fc2-1a64-4d53-5ce5-5038b263d251 AT SystematicSw DOT ab DOT ca> | |
<000801d64eae$3ed3eb00$bc7bc100$@gmail.com> | |
From: | Brian Inglis <Brian DOT Inglis AT SystematicSw DOT ab DOT ca> |
Autocrypt: | addr=Brian DOT Inglis AT SystematicSw DOT ab DOT ca; prefer-encrypt=mutual; |
keydata= | |
mDMEXopx8xYJKwYBBAHaRw8BAQdAnCK0qv/xwUCCZQoA9BHRYpstERrspfT0NkUWQVuoePa0 | |
LkJyaWFuIEluZ2xpcyA8QnJpYW4uSW5nbGlzQFN5c3RlbWF0aWNTdy5hYi5jYT6IlgQTFggA | |
PhYhBMM5/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsDBQkJZgGABQsJCAcCBhUKCQgLAgQW | |
AgMBAh4BAheAAAoJEB62lxu92I8Y0ioBAI8xrggNxziAVmr+Xm6nnyjoujMqWcq3oEhlYGAO | |
WacZAQDFtdDx2koSVSoOmfaOyRTbIWSf9/Cjai29060fsmdsDLg4BF6KcfMSCisGAQQBl1UB | |
BQEBB0Awv8kHI2PaEgViDqzbnoe8B9KMHoBZLS92HdC7ZPh8HQMBCAeIfgQYFggAJhYhBMM5 | |
/lbU970GBS2bZB62lxu92I8YBQJeinHzAhsMBQkJZgGAAAoJEB62lxu92I8YZwUBAJw/74rF | |
IyaSsGI7ewCdCy88Lce/kdwX7zGwid+f8NZ3AQC/ezTFFi5obXnyMxZJN464nPXiggtT9gN5 | |
RSyTY8X+AQ== | |
Organization: | Systematic Software |
Message-ID: | <f06c42e6-f801-09e3-9fab-3b242eed4672@SystematicSw.ab.ca> |
Date: | Tue, 30 Jun 2020 08:45:23 -0600 |
User-Agent: | Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 |
Thunderbird/68.9.0 | |
MIME-Version: | 1.0 |
In-Reply-To: | <000801d64eae$3ed3eb00$bc7bc100$@gmail.com> |
X-CMAE-Envelope: | MS4wfDeRjVVpXSCVP6YvNYOYg9Ujm/SL4U5vvesIpFlrNFVz4VI0tvif2vo184RHRqkAN3VWk1bdYw/I0xTmgReTn+jNSND7R25z81Oo04HfpZtOCwqMcrfU |
u79SzlVQCXC0ezCZXu/4joppDmOojm8z8JlyaY/URBPbOOx0ZqU9fd2zJm14G4/t5yQrecwe1uR6RA== | |
X-Spam-Status: | No, score=-10.0 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, |
KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, | |
TXREP autolearn=no autolearn_force=no version=3.4.2 | |
X-Spam-Checker-Version: | SpamAssassin 3.4.2 (2018-09-13) on |
server2.sourceware.org | |
X-BeenThere: | cygwin AT cygwin DOT com |
X-Mailman-Version: | 2.1.29 |
List-Id: | General Cygwin discussions and problem reports <cygwin.cygwin.com> |
List-Unsubscribe: | <http://cygwin.com/mailman/options/cygwin>, |
<mailto:cygwin-request AT cygwin DOT com?subject=unsubscribe> | |
List-Archive: | <https://cygwin.com/pipermail/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-request AT cygwin DOT com?subject=help> |
List-Subscribe: | <http://cygwin.com/mailman/listinfo/cygwin>, |
<mailto:cygwin-request AT cygwin DOT com?subject=subscribe> | |
Reply-To: | cygwin AT cygwin DOT com |
Errors-To: | cygwin-bounces AT cygwin DOT com |
Sender: | "Cygwin" <cygwin-bounces AT cygwin DOT com> |
On 2020-06-30 01:15, Kristian Ivarsson via Cygwin wrote: > [snip] > >> They have incompatible internal startup and runtime environments including >> stuff like initialization, signal, and exit function handling >> (cygwin/newlib/gcc vs >> Windows/APIs/VC) although Cygwin can build Windows-loadable dlls and >> Windows-runnable exes and call Windows (system) dlls that don't depend on >> msvcrt. > What is interesting is that ldd on cygwin1.dll says it depends on > msvcrt.dll, but that might not be a problem ? That might not be accurate: $ cygcheck cygwin1.dll Found: C:\...\cygwin64\bin\cygwin1.dll C:\...\cygwin64\bin\cygwin1.dll C:\Windows\system32\KERNEL32.dll C:\Windows\system32\ntdll.dll C:\Windows\system32\KERNELBASE.dll > It seems like you could somehow fix it with this trick > https://cygwin.com/faq/faq.html#faq.programming.msvs-mingw (though I don't > really understand what difference it would make, because something seems to > be missing in the explanation (or more probably there's something I don't > understand;-) and it seems to be a bit cumbersome as well if you're having a > large product with a long lifetime) That says you could build Cygwin apps using MS VC/VS, but must first build all libraries you use, including cygwin, as MS VC/VS compatible DLLs using gcc, impdef, and lib, and call their routines via Windows APIs, as they duplicate msvcrt routines. Both cygdrop and cygrunsrv do something similar: $ cygcheck cygdrop Found: C:\...\cygwin64\bin\cygdrop.exe C:\...\cygwin64\bin\cygdrop.exe C:\...\cygwin64\bin\cygwin1.dll C:\Windows\system32\KERNEL32.dll C:\Windows\system32\ntdll.dll C:\Windows\system32\KERNELBASE.dll C:\Windows\system32\ADVAPI32.dll C:\Windows\system32\msvcrt.dll C:\Windows\system32\SECHOST.dll C:\Windows\system32\RPCRT4.dll $ cygcheck cygrunsrv Found: C:\...\cygwin64\bin\cygrunsrv.exe C:\...\cygwin64\bin\cygrunsrv.exe C:\...\cygwin64\bin\cygwin1.dll C:\Windows\system32\KERNEL32.dll C:\Windows\system32\ntdll.dll C:\Windows\system32\KERNELBASE.dll C:\Windows\system32\ADVAPI32.dll C:\Windows\system32\msvcrt.dll C:\Windows\system32\SECHOST.dll C:\Windows\system32\RPCRT4.dll C:\Windows\system32\USER32.dll C:\Windows\system32\win32u.dll C:\Windows\system32\GDI32.dll Msys/2/Mingw allow Windows apps to be built by them or their Mingw Cygwin packages, to run natively/standalone under Windows, so they can be used when building, installing, or maintaining Cygwin, including e.g. cygcheck and setup: $ cygcheck cygcheck Found: C:\...\cygwin64\bin\cygcheck.exe C:\...\cygwin64\bin\cygcheck.exe C:\Windows\system32\ADVAPI32.dll C:\Windows\system32\msvcrt.dll C:\Windows\system32\ntdll.dll C:\Windows\system32\KERNELBASE.dll C:\Windows\system32\SECHOST.dll C:\Windows\system32\RPCRT4.dll C:\Windows\system32\KERNEL32.dll C:\Windows\system32\PSAPI.DLL C:\Windows\system32\USER32.dll C:\Windows\system32\win32u.dll C:\Windows\system32\GDI32.dll C:\Windows\system32\WININET.dll $ cygcheck setup-x86_64 Found: C:\...\setup-x86_64.exe C:\...\setup-x86_64.exe C:\Windows\system32\ADVAPI32.dll C:\Windows\system32\msvcrt.dll C:\Windows\system32\ntdll.dll C:\Windows\system32\KERNELBASE.dll C:\Windows\system32\SECHOST.dll C:\Windows\system32\RPCRT4.dll C:\Windows\system32\KERNEL32.dll C:\Windows\system32\COMCTL32.dll C:\Windows\system32\GDI32.dll C:\Windows\system32\win32u.dll C:\Windows\system32\USER32.dll C:\Windows\system32\ole32.dll C:\Windows\system32\combase.dll C:\Windows\system32\bcryptPrimitives.dll C:\Windows\system32\PSAPI.DLL C:\Windows\system32\SHELL32.dll C:\Windows\system32\SHLWAPI.dll C:\Windows\system32\WININET.dll C:\Windows\system32\WS2_32.dll > In my honest opinion I think this disability to use cygwin-libraries from > windows-applications kind of limits some of cygwins purpose, but I do still > think cygwin is a great open source project ;-) You have a choice under Cygwin of: - using Cygwin POSIX libraries with the Cygwin Unix emulation interface, allowing you to build and run most packages that run under Unix, without system (e.g. BSD, Darwin/MacOSX, or Linux) dependencies, including Cygwin/X to build and run X Window packages, or else - using Mingw packages and utilities with the Windows APIs. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in IEC units and prefixes, physical quantities in SI.] -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |