kaffe compiled with MS VC++

Valentin Pavlov kaffe@rufus.w3.org
Wed, 22 Nov 2000 09:36:18 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_0013_01C05467.AA96FB40
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

Actually kaffe compiles on win32 with gcc after doing some tricks.
I attach them in this mail

----- Original Message ----- 
From: "Maxim Kizub" <M.Kizub@post.skynet.lt>
To: <kaffe@rufus.w3.org>
Sent: Wednesday, November 22, 2000 3:53 AM
Subject: kaffe compiled with MS VC++


> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hello kaffe,
> 
>   I wish to use java as a scripting language
> for a game. So, I need _fast_ calls between
> java and C++ (it's written on C++). Also,
> it must run under Win32 and Linux (for now).
> So, MS VC++ and egcs are our primary compilers.
> Well, JNI is not sutable. It takes forever to
> call a native methods, and it's highly
> unconvinient. gcj is not the case too, since
> it works with gcc only, i.e. it's be inpossible
> to debug under MS VC++.
> The only way I found - is to use kaffe's KNI.
> It's fast, very convinient (especially, after
> I rewrite kaffeh to be more friendly with C++ ;-)).
> 
> The only problem - I need kaffe to be compiled
> with MS VC++. But first, it doesn't compile
> with cygnus right now too - looks like the
> problem is with libtools.
> 
> Well. IMHO, one way to support kaffe under
> win32 is to make _separate_ projects for
> MS VC++. It will allow to avoid instant
> problems with automake/autoconf/libtools
> under Win32, and will make ability to
> compiler under win32 mostly permanent.
> 
> So, anyone tryed to compile kaffe with MS VC++?
> If yes - can you send me projects and workplaces?
> Also, it whould be fine to have them in cvs...
> 
> - --
> Best regards,
>  Maxim                          mailto:M.Kizub@post.skynet.lt
> 
> -----BEGIN PGP SIGNATURE-----
> Version: PGP 6.5i
> 
> iQA/AwUBOhsZDOw5enpENJF+EQKa3wCggvF2QA57cQADLZWLHiLKQm9Og9kAn3hT
> 2dBt34/LENmq2mznwBa694sv
> =vzwz
> -----END PGP SIGNATURE-----
> 
> 
> 

------=_NextPart_000_0013_01C05467.AA96FB40
Content-Type: application/octet-stream;
	name="kaffe-on-cygwin"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
	filename="kaffe-on-cygwin"

CFLAGS="-s -O2" \
./configure \
--disable-debug \
--disable-feedback \
--disable-xdebugging \
--enable-shared \
--prefix="//c/kaffe" \
--libexecdir="//c/kaffe/bin" \
--sysconfdir="//c/kaffe/bin" \
--libdir="//c/kaffe/bin" \
--sharedstatedir="//c/kaffe" \
--datadir="//c/kaffe"


open config/config.h and comment the line:
#define HAVE_WINNT_H 1



open kaffe/Makefile and replase
LDFLAGS =
with
LDFLAGS = -lz



open kaffe/kaffevm/sha-1.h and change:
#undef ROTATE
#if defined(WIN32)
#define ROTATE(a,n)     _lrotl(a,n)
#else
#define ROTATE(a,n)     (((a)<<(n))|(((a)&0xffffffff)>>(32-(n))))
#endif

to
#define ROTATE(a,n)     (((a)<<(n))|(((a)&0xffffffff)>>(32-(n))))


open include\nets.h
comment these lines:
#ifndef h_errno
extern int h_errno;
#endif h_errno

and add #include "config-net.h"

------=_NextPart_000_0013_01C05467.AA96FB40--