From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23187 invoked by alias); 12 Dec 2004 22:55:57 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 23168 invoked from network); 12 Dec 2004 22:55:54 -0000 Received: from unknown (HELO mail.prospeed.net) (12.46.111.140) by sourceware.org with SMTP; 12 Dec 2004 22:55:54 -0000 Received: from enterprise-e.cygwin.com (lhall.prospeed.net [12.46.110.44] (may be forged)) by mail.prospeed.net (8.13.0/8.13.0) with ESMTP id iBCMtjNZ021143; Sun, 12 Dec 2004 17:55:47 -0500 Reply-To: Cygwin List Message-Id: <6.2.0.14.0.20041212173750.02f613c8@pop.prospeed.net> Date: Sun, 12 Dec 2004 22:55:00 -0000 To: "Daniel Starin" , From: Larry Hall Subject: Re: Visual Studio linking Cc: In-Reply-To: <200412122238.iBCMbvGM013362@pecan.cc.columbia.edu> References: <200412122238.iBCMbvGM013362@pecan.cc.columbia.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" X-SW-Source: 2004-12/txt/msg00400.txt.bz2 At 05:39 PM 12/12/2004, you wrote: >Hi. > > I am also trying to use functions implemented in cygwin1.dll with >Visual Studio as discussed below. After started a blank console application >and following steps below, I get to linking which gives me the following >error: > >Linking... >LIBCMTD.lib(crt0.obj) : error LNK2005: _mainCRTStartup already defined in >crt0.obj > >Any suggestions? Sure. Duck and run! You're clearly getting both the Cygwin and MS C run times linked in, which suggests you're using functionality from both. This can be dangerous in the extreme if you don't know what you're doing. In your particular case, you end up trying to link against CRT initialization routines from both libraries, which is clearly a recipe for disaster if it's not handled correctly. Doing this type of thing as the series of steps provided is no better than a work-around. It may work. It may not. If Alastair is willing to help you out with your case, that's great. But you should be warned that his approach isn't supported. Use it at your own risk. We're still looking for someone who's interested enough in this subject to re-enable automatic support for this in the Cygwin DLL itself. But it's been years since it worked and the level of interest by anyone on this list has never produced results unfortunately... -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746 -- 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/