X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org Date: Fri, 3 Oct 2008 14:19:47 -0400 From: Christopher Faylor To: cygwin AT cygwin DOT com Subject: Re: A dumb question about static libs ? Message-ID: <20081003181947.GB4663@ednor.casa.cgf.cx> Reply-To: cygwin AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com References: <003f01c9258c$660320e0$4001a8c0 AT mycomputer> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <003f01c9258c$660320e0$4001a8c0@mycomputer> User-Agent: Mutt/1.5.16 (2007-06-09) Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com On Fri, Oct 03, 2008 at 07:15:29PM -0000, John Emmas wrote: > I'm sure this'll seem obvious to those of you who are more experienced > with Cygwin than I am - but to me, it seems like a pretty reasonable > question..... > > I understand that Cygwin isn't an emulator and therefore it can't run a > standard Linux executable. I also understand why a Linux shared object > can't be used with Cygwin as if it was a DLL. > >But what about static libs? I've noticed that if I use Cygwin's nm.exe >I can list the contents of a Cygwin static lib. However, it also >happily lists the contents of a conventional Linux static lib. So >assuming (a) that the given Linux library was built for the right >processor - and assuming (b) it's the right library for any associated >header files, could it be used in building a Cygwin app? Anyone ever >tried this? No, because it wouldn't work. This has nothing to do with static vs. dynamic. While the format of a .a file may be similar that doesn't equate to object file interoperability. Cygwin's nm and ar commands could theoretically read archives from a number of other operating systems. That doesn't mean that the objects that are in the archive could be linked in. cgf -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/