This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Differences between C++ 'new' operator and 'malloc()' (NOT a C/C++ question)


Al Slater wrote:
> On 12/07/2012 16:59, Claude SIMON wrote:
>> Ryan Johnson wrote:
>>>
>>> [...]
>>>
>>> Sorry, I should have actually looked at the repo before assuming the
>>> test case was a monstrosity. By way of penance, I've now looked,
>>> downloaded, tweaked, and tested it.
>>>
>>> [...]
>>>
>>
>> Thanks for testing.
>>
>> I removed your test results (and the other stuff) from this message, not
>> because I'm not interested into, but because I have a new problem, which
>> prevents me to investigate further the original problem in the light of
>> your test results.
>>
>> 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'.
>>
>> I have the new error message with this modified test case, but also with
>> the original one. I suspect that the French error message is issued by
>> Cygwin or by one of its sub-component, since the JVM never issued a
>> message which wasn't in English, but Cygwin did.
>>
>> So, I have to postpone the study of the 'malloc()' related bug until I
>> manage to resolve this new issue ; I then come back to your test
>> results.
>> But, meanwhile, if someone has an idea why I have this new error...
>>
>> Here again the address where the test case can be found :
>> 	http://cvs.savannah.gnu.org/viewvc/epeios/bugs/jcmc/?root=epeios
>>
>
> Does
> http://cygwin.com/faq/faq.programming.html#faq.programming.msvs-mingw
> provide any help?
>

Not really, but thanks for your suggestion.

My Java native components are usually compiled under Visual C++. As I
provide them as Free Software, I would like to provide a way to compile
this components without having to use a proprietary compiler. This is why
I went for 'Cygwin', but 'Cygwin', and especially the 'Cygwin' DLL, isn't
required for my components to work.

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]