Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-Id: <4.3.1.2.20010418165543.0225b610@pop.ma.ultranet.com> X-Sender: lhall AT pop DOT ma DOT ultranet DOT com X-Mailer: QUALCOMM Windows Eudora Version 4.3.1 Date: Wed, 18 Apr 2001 16:59:39 -0400 To: Bill Grigg , cygwin AT cygwin DOT com From: "Larry Hall (RFK Partners, Inc)" Subject: Re: stripped dlls In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 04:07 PM 4/18/2001, Bill Grigg wrote: >In an ongoing attempt to link to a dll that was produced by MS VC++ I have >the following situation: > >1. When using the example (in the user manual section entitled - Linking >Against DLLs) on how to produce a library (MYDLL.a) file from the dll >(MYDLL.dll) I get the error message that there are "no symbols" in the dll. >It says the technique shown will only work if the dll is not "stripped". > >2. How do I get MS VC++ to generate a dll that is not "stripped"? > >3. I did try linking with MYDLL.lib which does not work. > >4. I also tried building MYDLL.a from MYDLL.lib using the aforementioned >technique. This appeared to work in that it generated MYDLL.a which was rich >with entry points. Unfortunately, none of them matched. > >5. I have tried declaring the functions with the following: > > extern int __declspec(dllimport) Get_Status_Nav (struct NAV_STAT_MSG* m); > >6. The cygwin (or GNU) linker complains with: > > undefined reference to _imp__Get_Status_Nav > >7. When I leave off the __declspec(dllimport) qualifier I get: > > undefined reference to Get_Status_Nav > >Any suggestions would be appeciated. > >BTW: thanks to Larry Hall who has been helping me along on this effort. Maybe I didn't mention this - I thought I did. You need to specify the stdcall calling convention. This means add __attribute__((stdcall)) to your declaration. Larry Hall lhall AT rfk DOT com RFK Partners, Inc. http://www.rfk.com 118 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple