3

I already have my program compiling on the linux gcj, but i'd like to statically compile for windows.

I've failed for linux. It always says: /usr/bin/ld: cannot find -lgcj collect2: ld returned 1 exit status

Has anyone succeed at this (a portable java gcj binary statically liked for windows). I don't want pointers to ExcelsiorJet or launch4j (that doesn't statically or AOT compile anything).

i30817
  • 1,356
  • 2
  • 13
  • 26
  • 1
    Why in God's name are you using gcj? A cursory search (here or on google) will turn up many points telling you that gcj is incomplete, slow, buggy, and just plain never worth using. – KitsuneYMG Feb 23 '11 at 00:33
  • 3
    Because it's the only free option to statically compile java that doesn't increase the download size by 80mb (uncompressed). Why am i statically compiling a java app? Well, i want to distribute it with a C program that would call it. And i use wine. Imagine me (that deletes wine many times over a week) installing the JRE 30 times. I say no to that. – i30817 Feb 23 '11 at 00:35

1 Answers1

3

Get the Windows GCJ from http://www.thisiscool.com/gcc_mingw.htm Follow the (GCJ 4.2) options on http://gcc.gnu.org/wiki/Statically_linking_libgcj to statically link libgcj.

Yes, it works on Wine.

damjan
  • 882
  • 8
  • 12