delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/04/17/12:11:26

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
X-Originating-IP: [156.153.255.114]
From: "John Roberts" <jsrober AT hotmail DOT com>
To: cygwin AT cygwin DOT com
Subject: Use Cygwin .o files in a Visual C Application?
Date: Tue, 17 Apr 2001 12:02:10 -0400
Mime-Version: 1.0
Message-ID: <F86YgEj4v5iJarnJ3kE0000c3e0@hotmail.com>
X-OriginalArrivalTime: 17 Apr 2001 16:02:10.0935 (UTC) FILETIME=[C2B8D870:01C0C757]

Hi,

I've been scouring the mailing list archives and am unable to find the 
answer to this question.

Can I compile a C source file to produce an object file using Cygwin:

$ gcc -c my_func.c -o my_func.o

And then link that object into a program using the Visual Studio compiler:

$ cl main.c my_func.obj

Is there anything I can do to make this work? If I created a DLL using 
Cygwin would I then be able to link the DLL in with main.c?

Here's the error I currently see when I perform the above commands:

(~/test) 649$ cl main.c my_func.obj
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for 80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.

main.c
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/out:main.exe
main.obj
my_func.obj
my_func.obj : warning LNK4078: multiple ".text" sections found with 
different at
tributes (E0000020)
(~/test) 650$


THANK YOU VERY MUCH FOR YOUR HELP!

John
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com


--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


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