| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| X-Originating-IP: | [218.94.62.209] |
| X-Originating-Email: | [quicktime2008 AT hotmail DOT com] |
| X-Sender: | quicktime2008 AT hotmail DOT com |
| From: | "wxWindows_study" <quicktime2008 AT hotmail DOT com> |
| To: | <cygwin AT cygwin DOT com> |
| Subject: | how to use dll created by cygwin in MS Visual C++? |
| Date: | Sun, 21 Mar 2004 21:59:20 +0800 |
| MIME-Version: | 1.0 |
| Message-ID: | <BAY15-DAV17d3OJXsNQ0002c6fb@hotmail.com> |
| X-OriginalArrivalTime: | 21 Mar 2004 13:55:01.0144 (UTC) FILETIME=[1A99E180:01C40F4C] |
| X-MIME-Autoconverted: | from base64 to 8bit by delorie.com id i2LDtAGN003274 |
I follow cygwin's user guide,create a dll as following:
//****************************************************
// this the dll file :@test_dll.c
//created by songyewen 2004/03/21
//****************************************************
#include <stdio.h>
int show_hello()
{
printf("this is the testing string from cygwin apps's dll file\n");
return 0;
}
//------------------------------
gcc -c test_dll.c
gcc -shared -o test_dll.dll test_dll.o
so I get the test_dll.dll
//------------------------------
//************************************************************
//this file is a demo for testing dll in cygwin apps
//@test_main.c
//created by songyewen 2004/03/21
//************************************************************
#include <stdio.h>
int main()
{
show_hello();
}
//-----------------------------
gcc -o test_main.c test_main.exe -L./ -ltest_dll
so I get test_main.exe and can run test_main.exe successfully!
But I failed to use the test_dll.dll in MS Visual C++?
Who can help me?
thanks in advance!!
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |