Re: Re: Using a DLL built with cygwin in VC++

2007-02-14 Thread Отец Батилович
First of all, have you read the Cygwin FAQ (specifically, *all* the 
questions in the Programming FAQ? Read the caveats about linking Cygwin 
DLLs 
into VC++ programs. Specifically, Q 16.

After you have understood what you're actually trying to do, you may want 
to 
try to follow the instructions in Q 16 to generate your .lib and .def 
files, 
and then make sure to put in the correct crt hooks, etc.

I've read all of the Cygwin's programming faq, I've tried the method they 
described in How can I build a relocatable dll?, first of all, there's no 
__imp_reent_data symbol in Cygwin dll, but there's reent_data, I used it 
instead, I've successfuly compiled and linked, but when I run my app I get an 
access violation writing at address 0x0, VS2005's debugger says that it's 
cygwin.dll is trying to do so. Then, I tried to remove all Cygwin API calls 
from my gcc compiled DLL and recompiled my app, everything worked fine. This 
exception occurs only if there're Cygwin API calls in DLL. So, what shall I do ?


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



Re: Using a DLL built with cygwin in VC++

2007-02-12 Thread Shankar Unni

Papasha wrote:
Hello, I'm trying to use a DLL created with cygwin in my VC++ project. 


First of all, have you read the Cygwin FAQ (specifically, *all* the 
questions in the Programming FAQ?  Read the caveats about linking Cygwin 
DLLs into VC++ programs. Specifically, Q 16.


After you have understood what you're actually trying to do, you may 
want to try to follow the instructions in Q 16 to generate your .lib and 
.def files, and then make sure to put in the correct crt hooks, etc.



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



Using a DLL built with cygwin in VC++

2007-02-08 Thread Papasha

Hello, I'm trying to use a DLL created with cygwin in my VC++ project. I
have a DLL file and I need to create .lib in order to use the DLL in VC++, I
use the following command sequence:

dlltool --export-all-symbols --output-def mylib.def mylib.dll #cygwin's 
dlltool

lib /DEF:mylib.def /OUT:mylib.lib #VC++'s lib

Then, I link my VC++ application using the mylib.lib, but the linker says:
mylib.lib : fatal error LNK1127: library is corrupt

What should I do ?


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



Using a DLL built with cygwin in VC++

2007-02-07 Thread Papasha

Hello, I'm trying to use a DLL created with cygwin in my VC++ project. I
have a DLL file and I need to create .lib in order to use the DLL in VC++, I
use the following command sequence:

dlltool --export-all-symbols --output-def mylib.def mylib.dll #cygwin's 
dlltool

lib /DEF:mylib.def /OUT:mylib.lib #VC++'s lib

Then, I link my VC++ application using the mylib.lib, but the linker says:
mylib.lib : fatal error LNK1127: library is corrupt

What should I do ?


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