delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/12/17/16:35:53

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
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
Message-Id: <200412172135.iBHLZXAj001234@jalapeno.cc.columbia.edu>
From: "Daniel Starin" <ds708 AT columbia DOT edu>
To: "'Cygwin List'" <cygwin AT cygwin DOT com>
Cc: <alastair DOT growcott AT bakbone DOT co DOT uk>
Subject: RE: Visual Studio linking
Date: Fri, 17 Dec 2004 16:36:34 -0500
MIME-Version: 1.0
In-Reply-To: <6.2.0.14.0.20041212173750.02f613c8@pop.prospeed.net>
X-No-Spam-Score: Local
X-IsSubscribed: yes

So, I realized I had the compile option "Use Managed Extensions" on in VS
.NET and that was causing the problem.  Now that I can include the libs in
my project, are there any header files that I can include from Visual Studio
to use them?...

When I include <pthread.h> from the cygwin/usr/include directory, for
example, I get errors like this...

test4.cpp
C:\cygwin\usr\include\sys\_types.h(15) : error C2144: syntax error :
'__int64' should be preceded by ';'
C:\cygwin\usr\include\sys\_types.h(15) : error C2501: '__extension__' :
missing storage-class or type specifiers
.....

Thanks,

Dan

-----Original Message-----
From: cygwin-owner AT cygwin DOT com [mailto:cygwin-owner AT cygwin DOT com] On Behalf Of
Larry Hall
Sent: Sunday, December 12, 2004 5:51 PM
To: Daniel Starin; cygwin AT cygwin DOT com
Cc: alastair DOT growcott AT bakbone DOT co DOT uk
Subject: Re: Visual Studio linking

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/


--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019