Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » Upp .dll
Re: Upp .dll [message #26145 is a reply to message #26139] Tue, 06 April 2010 00:41 Go to previous messageGo to previous message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
Previously, after copying the Java directory, it compiled with:
cl -Ic:\Java\jdk1.7.0\include -Ic:\Java\jdk1.7.0\include\win32 -MD -LD HelloWorld.c -FeHelloWorld.dll

My PATH originally was: C:\Windows\system32;C:\Windows
I added the Java but that probably was not necessary as that worked before.
After running the MS SDK CMD Shell (which is SetEnv.cmd) this is the PATH, what a mess.

PATH=C:\Program Files\Microsoft Visual Studio 9.0\VC\Bin;C:\Program Files\Micros
oft Visual Studio 9.0\VC\vcpackages;C:\Program Files\Microsoft Visual Studio 9.0
\Common7\IDE;C:\Program Files\Microsoft SDKs\Windows\v7.0\Bin;C:\Windows\Microso
ft.NET\Framework\v3.5;C:\Windows\Microsoft.NET\Framework\v2. 0.50727;C:\Program F
iles\Microsoft SDKs\Windows\v7.0\Setup;C:\Windows\system32;C:\Windows;C:\Wi ndows
\System32\Wbem;C:\Java\jdk1.7.0\bin;C:\Java\jdk1.7.0\include ;C:\Program Files\Mi
crosoft Visual Studio 9.0\VC\bin;C:\Program Files\Microsoft Visual Studio 9.0\Co
mmon7\IDE;C:\Program Files\Microsoft Visual Studio 9.0\VC\include

After removing any changes to the original and re doing the javac, javah and cl and trying java HelloWorld:
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\MyApps\JNIex\HelloWorld.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1922)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1848)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1078)
at HelloWorld.<clinit>(HelloWorld.java:7)

line 7: printf("Hello World!\n");
then the C/C++ cl compiled .h/.dll

Attached is the code as in the original example.
  • Attachment: Hello.zip
    (Size: 6.07KB, Downloaded 500 times)

[Updated on: Tue, 06 April 2010 02:24]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [solved, i guess]difficulty with sqlite3 schema
Next Topic: image drawing
Goto Forum:
  


Current Time: Sun Aug 24 13:30:19 CEST 2025

Total time taken to generate the page: 0.04775 seconds