delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
From: | "Dave Korn" <dave DOT korn AT artimi DOT com> |
To: | <cygwin AT cygwin DOT com> |
Subject: | RE: Code using archive file that compiles with g++ on linux but gives linking problem with g++ on cygwin |
Date: | Wed, 14 Jun 2006 19:10:41 +0100 |
Message-ID: | <041601c68fdd$d9298880$a501a8c0@CAM.ARTIMI.COM> |
MIME-Version: | 1.0 |
X-Mailer: | Microsoft Office Outlook 11 |
In-Reply-To: | <f89350620606141100o798515b4w45358227f0902ba8@mail.gmail.com> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
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 14 June 2006 19:01, Ganesh Ramakrishnan wrote: > I have an archive libminipar.a. I have a C++ program pdemo.cpp that > makes use it. > ... When I compile the program on linux, I get no errors. > However, when I compile it on cygwin using g++ version 3.4.4, I get > the following linking error [ snip bunch of error messages that imply absolutely nothing was found in the library. ] > Any idea why this should happen? I tried to use the -static flag while > linking on the linux machine and tried using the binary on cygwin. But > cygwin did not recognize the binary. Nope, you can't run a linux compiled binary on cygwin; the underlying O/S is too fundamentally different. Windows doesn't even use ELF format, for a start. So cygwin only emulates linux at the source-code level: everything needs to be recompiled, but it should just recompile and run straightforwardly. Therefore my guess is that you've tried to just move the library archive across and use it on the cygwin setup. That also won't work, for exactly the same reason why moving binaries won't work. The solution is the same as for binaries: recompile the library from source, so that you've got a windows-format library archive. cheers, DaveK -- Can't think of a witty .sigline today.... -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |