How to load openssl library in VC

2006-07-04 Thread cxf
Hi,all: I want load the library cygcrypto-0.9.8.dll dynamicly,so I write the program following the Cgywin FAQ "How do I use cygwin1.dll with Visual Studio or MinGW?" The program is: typedef void (FAR __cdecl *init)(); init x; BYTE buffer[6]; HINSTANCE dllInstance; HINSTAN

How to load openssl library in VC

2006-07-04 Thread cxf
Hi,all: I want load the library cygcrypto-0.9.8.dll dynamicly,so I write the program following the Cgywin FAQ "How do I use cygwin1.dll with Visual Studio or MinGW?" The program is: typedef int (FAR __cdecl *init)(); init x; BYTE buffer[6]; HINSTANCE dllInstance; HINST

How to use the generated lib in C++ Program

2006-07-02 Thread cxf
I Follow the FAQ "How can an MSVC program call a MinGW DLL, and vice versa?" and generate the library testdll.lib.But when I use the testdll.lib in VC,it seems ok when linking with .c files, but when I change the file extenstion from ".c" to ".cpp", the VC can not link with it. Are there any diffe

Load dll in VC

2006-06-22 Thread cxf
I have a standard dll file CYGCRYPTO-0.9.8.DLL. Using the VC tool "depends",I can see that this dll file depends on cygwin1.dll.when I load the file CYGCRYPTO-0.9.8.DLL in VC,the program is stoped,I don't know why.I do the following in VC: LoadLibrary("CYGCRYPTO-0.9.8.DLL"); (cygwin1.d

How to Create Static library or dll file not depending on cygwin's dll

2006-06-22 Thread cxf
I have a source file "crypto.c",in this file I use the functions which in openssl library. So I compile the file with the following command gcc -c crypto.c gcc -shared -mno-cygwin -o crypto.dll crypto.o -lcrypto But the compiled dll file "crypto.dll" depends on the cygcrypto-0.9.8.dll, can I ha

how to create static library in cygwin

2006-06-21 Thread cxf
Hello, everyone: I compile source files, create a dll file "cygtspi.dll" , an import file "libtspi.dll.a" and a link file "libtspi.la",How can I use the dll in windows(such as using the dll in VC). the "cygtspi.dll" seems depends on several cygwin's dll. Another question: How can I create

How to create dll in cygwin

2006-06-21 Thread cxf
Hello,everyone: I want to create a dll from source file, how to create dll in cygwin, can anyone give me some tips. Can cygwin create static library(.lib file)? -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Doc

static library in linux and Cygwin

2006-06-11 Thread cxf
Hello,everyone: I compile the static library in cygwin just like in linux,but when I link my program with the Library, it did not find the function included in the library. Are there any difference between linux and cygwin when using and compiling the static library. -- Unsubscribe info

How to use openssl in cygwin

2006-06-05 Thread cxf
Hi,all: I installed the Cygwin which is the Full version. I write the Program as the following: #include int main() { EVP_MD_CTX md_ctx; unsigned int result_size; int rv; rv = EVP_SignInit(&md_ctx, EVP_sha1()); return rv; } It is very simple,then I compil