From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5770 invoked by alias); 24 Mar 2003 09:32:02 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 5736 invoked from network); 24 Mar 2003 09:31:59 -0000 Received: from unknown (HELO web13207.mail.yahoo.com) (216.136.174.192) by sources.redhat.com with SMTP; 24 Mar 2003 09:31:59 -0000 Message-ID: <20030324093159.13068.qmail@web13207.mail.yahoo.com> Received: from [213.170.46.30] by web13207.mail.yahoo.com via HTTP; Mon, 24 Mar 2003 10:31:59 CET Date: Mon, 24 Mar 2003 11:41:00 -0000 From: =?iso-8859-1?q?Sacri=20Acuyo?= Subject: help!! To: cygwin@cygwin.com MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-SW-Source: 2003-03/txt/msg01627.txt.bz2 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/