Temple of The Roguelike Forums

Development => Programming => Topic started by: Turgeon on December 30, 2009, 02:48:37 PM

Title: Java Roguelike Libs and a mac
Post by: Turgeon on December 30, 2009, 02:48:37 PM
Hi,
Ive the problem that I dont get any Java Roguelike-APIs on my Macbook (64bit OSX Leopard) to work. Ive tried Jcurses (with the libjcurses.so for mac from slashies site) and getting this exception:
Code: [Select]
Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/magro/Documents/workspace/roguelikeDev/RoguelikeCurses/lib/libjcurses.so:  no suitable image found.  Did find:  /Users/magro/Documents/workspace/roguelikeDev/RoguelikeCurses/lib/libjcurses.so: mach-o, but wrong architecture
Heres my main method:
Code: [Select]
public static void main(String[] args) throws Exception
    {    
        Window w = new Window(40, 20, true, "Hello World Window");

        DefaultLayoutManager mgr = new DefaultLayoutManager();
        mgr.bindToContainer(w.getRootPanel());
        mgr.addWidget(
            new Label("Hello World!", new CharColor(CharColor.WHITE, CharColor.GREEN)),
            0, 0, 40, 20,
            WidgetsConstants.ALIGNMENT_CENTER,
            WidgetsConstants.ALIGNMENT_CENTER);

        w.show();
        Thread.currentThread().sleep(5000);
        w.close(); // reset the native console
    }
Im using eclipse and put the jcurses.jar in the build path under libraries and the so file in the same directory... so it should work.
Any hints what to do?


libjcsi is the another thing i tested, but there I get always this exception, when I want to start one of the examples..

EDIT: Ok, libjcsi is now working... had some setting problems with the running jre. ;)

I want to try slashies serf api too, but dont find any documentation or a small example...

Perhaps someone could give me some hints where to start at best... or fix this?

Thanks,
Turgeon
Title: Re: Java Roguelike Libs and a mac
Post by: Etinarg on December 30, 2009, 05:00:44 PM
Quote
no suitable image found. 
Did find:  /Users/magro/Documents/workspace/roguelikeDev/RoguelikeCurses/lib/libjcurses.so: mach-o, but wrong architecture

From this I think you don't have the right libraries instaleld for your processor architecture (I don't know if  32/64 bit mismatch already can cause this, and I have no mac, just trying to interpret the message.)