Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <3E2619AF.8060107@kleckner.net> Date: Wed, 15 Jan 2003 18:32:15 -0800 From: Jim Kleckner User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4.1) Gecko/20020508 Netscape6/6.2.3 X-Accept-Language: en-us MIME-Version: 1.0 To: "Larry Hall (RFK Partners, Inc)" CC: cygwin AT cygwin DOT com Subject: Re: Using gcc to build a DLL discovered and linked at runtime References: <4 DOT 3 DOT 1 DOT 2 DOT 20030115160210 DOT 036f2680 AT pop DOT rcn DOT com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Larry Hall (RFK Partners, Inc) wrote: > >I assume the reason you're using the -mno-cygwin flag is because of >Chris's comment. Clearly what you're trying to do won't work if you >link against the Cygwin DLL. Using -mno-cygwin should remove cygwin1.dll >from the equation but just substituting MSCVRT.DLL for cygwin1.dll doesn't >mean that MSCVRT.DLL will load dynamically either. I dunno but judging >by the fact that you're still having troubles, the assumption is suspect. >However, since you're no longer linking against cygwin1.dll (which isn't >going to work), you're really just using the mingw pseudo cross compiler of >Cygwin's gcc (the -mno-cygwin switch) to produce a straight Win32 DLL. In >this context, it's really not a Cygwin question anymore (you could use >mingw's gcc and presumably see the same problem... if not, then maybe that's >your solution). I'd recommend following up on this at mingw-users AT mingw DOT org >if the mingw site doesn't have a solution for this problem. > >Good luck, > > >Larry Hall lhall AT rfk DOT com >RFK Partners, Inc. http://www.rfk.com >838 Washington Street (508) 893-9779 - RFK Office >Holliston, MA 01746 (508) 893-9889 - FAX > Thank you for the pointers. I downloaded mingw and it gives the same behavior. I will ask the question on the mingw list. Note that this example doesn't use cygwin or for that matter any functions at all. Jim #include "windef.h" extern int __stdcall PPI(int); __declspec(dllexport) int __stdcall PPI(int notused) { return 1; } -- 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/