Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Unable to find native library libsndfile-1.dll  (Read 7628 times)

0 Members and 1 Guest are viewing this topic.

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Unable to find native library libsndfile-1.dll
« on: October 20, 2012, 01:56:25 pm »
Well I just tried to launch my application from outside the IDE and it fails on me and I don't know what I am doing wrong. I get this error message:

Quote
$ java -jar GameApplication.jar
Exception in thread "main" org.jsfml.JSFMLError: Could not find native library i
n the classpath: windows_x86/libsndfile-1.dll
        at org.jsfml.SFMLNative.loadNativeLibraries(Unknown Source)
        at org.jsfml.SFMLNativeObject.<init>(Unknown Source)
        at org.jsfml.window.Window.<init>(Unknown Source)
        at org.jsfml.graphics.RenderWindow.<init>(Unknown Source)
        at graphics.RenderWindow.<init>(RenderWindow.java:17)
        at GameApplication.<init>(GameApplication.java:21)
        at GameApplication.main(GameApplication.java:13)

Weird thing is that I am running 64 bit windows and is compiling everything for 64 bit windows. Could it be something wrong here? Though weird how Netbeans would be able to solve it, am I launching the application somehow wrong?

Netbeans puts the libraries in it's own folder called lib in the distribution folder of the project, don't know if that can somehow affect it?
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
Re: Unable to find native library libsndfile-1.dll
« Reply #1 on: October 20, 2012, 02:00:43 pm »
Make sure you are running it with a 64-bit Java installation. Your OS architecture doesn't matter. If you're on a 64-bit system, but use a 32-bit Java, Java will be 32-bit.

As a simple test, run
Code: [Select]
java -versionin a command line. The last line should contain info about the JVM's architecture.
JSFML - The Java binding to SFML.

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Re: Unable to find native library libsndfile-1.dll
« Reply #2 on: October 20, 2012, 02:29:53 pm »
Well it seemed like the 32bit installation that my web-browser needed was taking precedence to my 64bit installation so I had to uninstall that before I could get it to work. It works fine now.
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
Re: Unable to find native library libsndfile-1.dll
« Reply #3 on: October 21, 2012, 11:58:06 am »
Well it seemed like the 32bit installation that my web-browser needed was taking precedence to my 64bit installation so I had to uninstall that before I could get it to work. It works fine now.
Unless you're using a 64-bit browser, that will always be the case. A 32-bit browser cannot load a 64-bit JVM. ;) Mind you that most browsers are (STILL) only available in 32-bit.

Good to know it works! :)
JSFML - The Java binding to SFML.

Groogy

  • Hero Member
  • *****
  • Posts: 1469
    • MSN Messenger - groogy@groogy.se
    • View Profile
    • http://www.groogy.se
    • Email
Re: Unable to find native library libsndfile-1.dll
« Reply #4 on: October 21, 2012, 12:28:51 pm »
Guess I should compile all available versions of JSFML when deploying the application right? Seems like it would be able to solve what library to use itself (Except maybe that the size will be insanely huge)
Developer and Maker of rbSFML and Programmer at Paradox Development Studio

pdinklag

  • Sr. Member
  • ****
  • Posts: 330
  • JSFML Developer
    • View Profile
    • JSFML Website
Re: Unable to find native library libsndfile-1.dll
« Reply #5 on: October 21, 2012, 07:31:14 pm »
Not insanely huge.
At the moment, I plan on packing up Windows, Debian and Mac OS X libraries. Total size is about 3.5 MB then.

When there's a release, all those binaries will be in it so users won't have to worry about that.
JSFML - The Java binding to SFML.

 

anything