This is the mail archive of the java@gcc.gnu.org mailing list for the Java 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: Weird segmentation fault (2)


The requirement is that the main method is written in another language than Java, C or C++. This is because I use gcj to write a backend library in java for which it has to be possible for other people to develop in other languages. In this particular case, it needs to be possible to write a GUI in pure C/C++ and just link against a gcj library which provides common functionalities.

Tom Tromey wrote:
"Geert" == Geert Bevin <gbevin at uwyn dot com> writes:


Geert> I just compile this with 'gcc -o main main.cc -lgcj', execute with
Geert> ./main and get a segmentation fault again.

Geert> The above code should function, no?

It is really a lot easier if you make `main' a Java method.
I suggest doing this unless there is some reason you absolutely
cannot.

In that case you'll have to read through the list archives a bit.
People occasionally have problems with the CNI invocation API.  I'm
not up-to-date on all the problems with it.

We need to add some test cases for this; currently we don't test it at
all...  If you have some simple code that works, send it and I'll try
to get it in the test suite.

Tom


--
Geert Bevin                       Uwyn
"Use what you need"               Lambermontlaan 148
http://www.uwyn.com               1030 Brussels
gbevin[remove] at uwyn dot com    Tel & Fax +32 2 245 41 06

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers pgp.mit.edu, wwwkeys.pgp.net


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