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]
Other format: [Raw text]

Cygwin DLLs and MSVC


Hi all, 
  I compiled (under cygwin) a c source file which contains a set of 
useful functions. 
Suppose the c source file cannot be easly compiled by using a native 
Win32 compiler. The idea here is to generate a (cygwin) dll which 
users might link from within a native C compiler (Visual Studio, for 
example). 

gcc -c test.c
gcc -shared test.o -o test.dll

Now I'd like to be able to use the dll 'test.dll' from within Visual 
Studio. Is it possible? 

I generated a file test.lib (and of course - a test.dll file) by using 
the 'dlltool' tool, and then I imported the test.lib file from within  
MSVC. I supposed the test.lib is a simple signature of any symbol 
test.dll can export, and I actually successfully compiled and linked 
it with a client code, but execution failed into a segfault. 

I'm wondering if this is the right way to have a dll generated with 
gcc working within MSVC. 
Thank you in advance, 
  Roberto Cavada

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


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