X-Spam-Check-By: sourceware.org
Message-ID: <4637DC83.1090406@cygwin.com>
Date: Tue, 01 May 2007 20:34:11 -0400
From: "Larry Hall (Cygwin)" <reply-to-list-only-lh@cygwin.com>
Reply-To: cygwin@cygwin.com
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.10) Gecko/20070308 Fedora/1.5.0.10-2.fc4.remi Thunderbird/1.5.0.10 Mnenhy/0.7.5.0
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: using Cygwin (-mno-cygwin) to JNI to a 3rd party DLL
References: <84d4a6d50705011311m24edaf7dw73f40a72bc4a750e@mail.gmail.com> 	 <4637A234.A44A5BCC@dessent.net> <84d4a6d50705011517u77d03a34m3fc1d97eeaa7cd31@mail.gmail.com>
In-Reply-To: <84d4a6d50705011517u77d03a34m3fc1d97eeaa7cd31@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 05/01/2007, Pete Flugstad wrote:
> On 5/1/07, Brian Dessent <brian AT dessent DOT net> wrote:
                            ^^^^^^^^^^^^^^^^^^^^^^^^
<http://cygwin.com/acronyms/#PCYMTNQREAIYR>.  Thanks,

> > You'll have to run this in a debugger to be sure, but I'd start looking
> > at calling convention clashes, i.e. stdcall vs cdecl.  This should be a
> > function of the header files and how they declare prototypes.
> 
> The thing that's odd is that without the 3rd party DLL present, everything
> works just fine.  My JNI functions are called and work (just debug printouts
> in that case).  Only when I actually call the 3rd party DLL (and obviously
> I'm linking against it), does it fail - and it fails before it even
> tries to call
> a function - during the loading phase.

I think the questions you need to ask yourself are:

 o What are you using in place of the 3rd party DLL in the cases where it
   works?
 o How was it compiled?
 o How well do those settings match what the 3rd party DLL used?

Depending what the answers are, it may well describe your successes and
failures.

-- 
Larry Hall                              http://www.rfk.com
RFK Partners, Inc.                      (508) 893-9779 - RFK Office
216 Dalton Rd.                          (508) 893-9889 - FAX
Holliston, MA 01746

_____________________________________________________________________

A: Yes.
> Q: Are you sure?
>> A: Because it reverses the logical flow of conversation.
>>> Q: Why is top posting annoying in email?

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

