public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* JNI with g++
@ 2011-11-05 10:23 Kraus Philipp
  2011-11-05 11:30 ` Eliot Moss
  2011-11-05 12:28 ` Csaba Raduly
  0 siblings, 2 replies; 3+ messages in thread
From: Kraus Philipp @ 2011-11-05 10:23 UTC (permalink / raw)
  To: cygwin

Hello,

I try to build under Cygwin a JNI shared library. I must use Cygwin because Atlas & LAPack can be compiled only under Cygwin without the -mno-cygwin flag.
So my library code will be compiled. I link to other Cygwin compiled libraries (*.dll) and some static libs. If I run my Java example I see with the Sysinternal
ProcessExplorer that the libraries will be loaded but the library function(s) won't be run. The code does not create any exception or anything else, only
the function code does not run.

Is there any difference for the linker? All libs are compiled under Cygwin so, if I use them under an executable everything works fine.

Hope anybody can help me with this strange problem !?

Thanks

Phil

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: JNI with g++
  2011-11-05 10:23 JNI with g++ Kraus Philipp
@ 2011-11-05 11:30 ` Eliot Moss
  2011-11-05 12:28 ` Csaba Raduly
  1 sibling, 0 replies; 3+ messages in thread
From: Eliot Moss @ 2011-11-05 11:30 UTC (permalink / raw)
  To: cygwin

On 11/5/2011 5:22 AM, Kraus Philipp wrote:
> Hello,
>
> I try to build under Cygwin a JNI shared library. I must use Cygwin because Atlas&  LAPack can be compiled only under Cygwin without the -mno-cygwin flag.
> So my library code will be compiled. I link to other Cygwin compiled libraries (*.dll) and some static libs. If I run my Java example I see with the Sysinternal
> ProcessExplorer that the libraries will be loaded but the library function(s) won't be run. The code does not create any exception or anything else, only
> the function code does not run.
>
> Is there any difference for the linker? All libs are compiled under Cygwin so, if I use them under an executable everything works fine.
>
> Hope anybody can help me with this strange problem !?

Assuming that you're talking about Oracle/Sun Java, cygwin
libs won't run with it -- Java is not a cygwin app but a
regular Windows app. Its run=time environment is totally
different. You have to figure a way to build with no-cygwin
using some toolset or other ...

Regards -- Eliot Moss

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: JNI with g++
  2011-11-05 10:23 JNI with g++ Kraus Philipp
  2011-11-05 11:30 ` Eliot Moss
@ 2011-11-05 12:28 ` Csaba Raduly
  1 sibling, 0 replies; 3+ messages in thread
From: Csaba Raduly @ 2011-11-05 12:28 UTC (permalink / raw)
  To: cygwin, philipp.kraus

Hi,

On Sat, Nov 5, 2011 at 11:22 AM, Kraus Philipp  wrote:
> Hello,
>
> I try to build under Cygwin a JNI shared library. I must use Cygwin because Atlas & LAPack can be compiled only under Cygwin without the -mno-cygwin flag.
> So my library code will be compiled. I link to other Cygwin compiled libraries (*.dll) and some static libs. If I run my Java example I see with the Sysinternal
> ProcessExplorer that the libraries will be loaded but the library function(s) won't be run. The code does not create any exception or anything else, only
> the function code does not run.

I'm sorry, but "function code does not run" is not sufficient to
diagnose the problem.
Have you tried putting print statements before and after the function
invocation to see whether Java tries to call the function?


Csaba
-- 
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
The Tao of math: The numbers you can count are not the real numbers.
Life is complex, with real and imaginary parts.
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds
"People disagree with me. I just ignore them." -- Linus Torvalds

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-05 12:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-05 10:23 JNI with g++ Kraus Philipp
2011-11-05 11:30 ` Eliot Moss
2011-11-05 12:28 ` Csaba Raduly

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).