X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-3.3 required=5.0	tests=AWL,BAYES_00,FSL_RCVD_USER,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_YE,TW_JC
X-Spam-Check-By: sourceware.org
Message-ID: <ac49e457544ecbd63be3a58683308889.squirrel@zeusw.org>
In-Reply-To: <1342195424.30517.ezmlm@cygwin.com>
References: <1342195424.30517.ezmlm@cygwin.com>
Date: Wed, 18 Jul 2012 10:03:36 +0200
Subject: Re: Differences between C++ 'new' operator and 'malloc()' (NOT a C/C++ question)
From: "Claude SIMON" <simon.claude@zeusw.org>
To: cygwin@cygwin.com
Reply-To: simon.claude@zeusw.org
User-Agent: SquirrelMail/1.4.21
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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

Csaba Raduly wrote:
> On Thu, Jul 12, 2012 at 5:59 PM, Claude SIMON  wrote:
> (snip)
>> Since my last testings, I updated Cygwin, the JDK and the JRE. So, my
>> current configuration is now :
>>
>> Windows Vista 32 bits SP2
>> Cygwin 1.7.15
>> g++ 4.5.3
>> javac 1.7.0_05
>> javah 1.7.0_05
>> java 1.7.0_05
>>
>> When running the test case, I now have :
>>
>> $ java jcmc
>> Loading library 'jcmc'...Exception in thread "main"
>> java.lang.UnsatisfiedLinkError: H:\cvs\epeios\bugs\jcmc\jcmc.dll:
>> L'accÞs
>> Ó cet emplacement de la mÚmoire n'est pas valide
>>         at java.lang.ClassLoader$NativeLibrary.load(Native Method)
>>         at java.lang.ClassLoader.loadLibrary1(Unknown Source)
>>         at java.lang.ClassLoader.loadLibrary0(Unknown Source)
>>         at java.lang.ClassLoader.loadLibrary(Unknown Source)
>>         at java.lang.Runtime.loadLibrary0(Unknown Source)
>>         at java.lang.System.loadLibrary(Unknown Source)
>>         at jcmc.main(jcmc.java:9)
>>
>> There is a French message which roughly means "The access to this memory
>> location is not valid"
>>
>> I updated the test case to reflect your changes :
>>         - 'Makefile' now generates the '.h' file,
>>         - 'Makefile' does no more contain the '--stdcall-alias' linker
>> flag,
>>         - the '.cpp' contains now the `extern "C"' directive,
>>         - the '.h' is removed from test case, since it's now generated
>> by the 'Makefiile'.
>
> This sounds a bit like my JNI problem:
>
> http://cygwin.com/ml/cygwin/2012-07/msg00043.html
>

It's worse, as in my case, the component isn't even loaded !

You should try the 'MinGW' compiler, as I did.
With the 'default' Cygwin compiler, I never manage to have a working Java
native component. But with the 'MinGW' compiler, my Java native component
finally works !

--
Claude SIMON
http://zeusw.org/


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

