gurrhack / NetHack-Android

Android port of NetHack
128 stars 23 forks source link

dlopen failed: cannot locate symbol "dump_line" #33

Closed pftbest closed 6 years ago

pftbest commented 6 years ago

Tried to compile apk from source code, and I get this error in run-time:

10-28 01:48:07.009 10693-10722/com.tbd.NetHack E/AndroidRuntime: FATAL EXCEPTION: nh_thread
                                                                 Process: com.tbd.NetHack, PID: 10693
                                                                 java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "dump_line" referenced by "/data/app/com.tbd.NetHack-bIHQ9rA-7gRCQbOSvVspxA==/lib/arm/libnethack.so"...
                                                                     at java.lang.Runtime.loadLibrary0(Runtime.java:1016)
                                                                     at java.lang.System.loadLibrary(System.java:1657)
                                                                     at com.tbd.forkfront.NetHackIO$1.run(NetHackIO.java:139)
                                                                     at java.lang.Thread.run(Thread.java:764)

Maybe you have seen it before?

gurrhack commented 6 years ago

I forgot to add dump to the Makefile. Will commit a fix shortly.

pftbest commented 6 years ago

After adding dump.c, I get a compile error

dump.c:6:18: fatal error: date.h: No such file or directory
 #include "date.h"
                  ^
compilation terminated.

I can't find this date.h file anywhere. Was it present in some old version of ndk?

gurrhack commented 6 years ago

Now it's fixed for real. Sorry about that. (date.h is autogenerated during the build)

pftbest commented 6 years ago

@gurrhack Yes, now it works, thanks!

Also my theory was correct, just changing one line from:

    <uses-sdk
        android:minSdkVersion="7"/>

to

    <uses-sdk
        android:minSdkVersion="7"
        android:targetSdkVersion="15"/>

Made the the game run much faster on high resolution screens. Especially noticeable when scrolling a long list of items for example.

This line allows the android to turn on hardware acceleration and leverage the GPU that is present in all devices since android 4.0. Also it will probably make the game more power efficient too. Give it a try.

gurrhack commented 6 years ago

I will, thanks.