delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/24/04:32:14

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <20030324093159.13068.qmail@web13207.mail.yahoo.com>
Date: Mon, 24 Mar 2003 10:31:59 +0100 (CET)
From: =?iso-8859-1?q?Sacri=20Acuyo?= <sacuyo AT yahoo DOT es>
Subject: help!!
To: cygwin AT cygwin DOT com
MIME-Version: 1.0
Note-from-DJ: This may be spam

Hello, I would like to make you a question:

I'm trying to call to java code from C++ code, so I
have just do it for linux with gcc using gcj and gcjh.
Now, I have been trying the same for Windows 2000,
following these steps:

1.- Write the java file --> prueba_java.java
2.- Compile it with javac --> javac prueba_java.java
3.- Create the header file --> gcjh prueba_java
4.- Create the .o file --> 
          gcj gcj -c -g -O prueba_java.java 
5.- Write the C++ file, from which I call the java
code --> main.cc
6.- Compile it --> gcc -c -I /MinGW/include main.cc
7.- Linking with java code --> 
    gcc -static main.o prueba_java.o -o ejecutable -L
-L/MinGW/lib -lgcj -lmingw32 -lwsock32

   And when I try to execute the executable file (
ejecutable ), but it dies with an abnormal program
termination, because of the following error:

Program received signal SIGSEGV, Segmentation fault.
0x78002320 in _libwsock32_a_iname ()
(gdb) where
#0  0x78002320 in _libwsock32_a_iname ()
#1  0x0043f966 in
java::lang::System::init_properties() ()
#2  0x00413335 in
java::lang::System::getProperty(java::lang::String*)
()
#3  0x00458caa in
java::util::TimeZone::__U3c_clinit__U3e_() ()
#4  0x0040530f in java::lang::Class::initializeClass()
()
#5  0x004d671c in _Jv_InitClass () at {standard
input}:205
#6  0x004543f6 in
java::util::TimeZone::getTimeZone(java::lang::String*)
()
#7  0x00412f79 in
java::lang::System::getDefaultTimeZoneId() ()
#8  0x0043f7ed in
java::lang::System::init_properties() ()
#9  0x00413335 in
java::lang::System::getProperty(java::lang::String*)
()
#10 0x004602b1 in
java::io::PrintStream::__U3c_clinit__U3e_() ()
#11 0x0040530f in java::lang::Class::initializeClass()
()
#12 0x00402c31 in _Jv_AllocObjectNoFinalizer ()
#13 0x004136e7 in
java::lang::System::__U3c_clinit__U3e_() ()
#14 0x0040530f in java::lang::Class::initializeClass()
()
#15 0x004d671c in _Jv_InitClass () at {standard
input}:205
#16 0x004133e0 in
java::lang::System::getSecurityManager() ()
#17 0x0040c81a in java::lang::Thread::checkAccess() ()
#18 0x0040ca24 in java::lang::Thread::setDaemon(bool)
()
#19 0x004127a2 in
gnu::gcj::runtime::FinalizerThread::FinalizerThread()
()
#20 0x0040396f in _Jv_CreateJavaVM(void*) ()
#21 0x004d674d in JvCreateJavaVM(void*) () at
{standard input}:205
#22 0x004012b7 in main ()

I would like you to tell me how to solve this problem,
if it's possible..

Thank you very much for your attention..


___________________________________________________
Yahoo! Messenger - Nueva versión GRATIS
Super Webcam, voz, caritas animadas, y más...
http://messenger.yahoo.es

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019