This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Use Cygwin .o files in a Visual C Application?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]