Hello everyone,
This is to remind you that Code Jam Online Round 3 will held tomorrow 14:00 UTC [18:00 MSK]
Good Luck!
# | User | Rating |
---|---|---|
1 | tourist | 3947 |
2 | jiangly | 3734 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3612 |
7 | ecnerwala | 3581 |
8 | Geothermal | 3569 |
8 | cnnfls_csy | 3569 |
10 | ksun48 | 3479 |
# | User | Contrib. |
---|---|---|
1 | awoo | 162 |
2 | maomao90 | 160 |
3 | nor | 156 |
4 | adamant | 155 |
4 | cry | 155 |
4 | atcoder_official | 155 |
4 | -is-this-fft- | 155 |
8 | maroonrk | 153 |
9 | SecondThread | 147 |
10 | Petr | 146 |
Hello everyone,
This is to remind you that Code Jam Online Round 3 will held tomorrow 14:00 UTC [18:00 MSK]
Good Luck!
Hi I didn't find solution how to create 64 bit dll. And use it's native c++ methods. I use Java code metodynatywne.java :
class metodynatywne {
static {
System.loadLibrary("metodynatywne");
}
native public void sayHello();
public static void main (String argv[])
{
new metodynatywne().sayHello();
} }
then generated metodynatywne.h using javah -jni metodynatywne
I wrote metodynatywne.cpp code :
#include <jni.h>
#include <iostream>
#include "metodynatywne.h"
using namespace std;
JNIEXPORT void JNICALL
Java_metodynatywne_sayHello(JNIEnv * env, jobject self)
{
cout << "Hello World!" << endl;
}
I ussed gcc to create my dll with comands :
c:\>c++ -I c:\java7\include -I c:\java7\include\win32 -c metodynatywne.cpp
and
c:\>c++ -shared metodynatywne.o -o metodynatywne.dll
and what what I'm getting is error message:
c:\>java metodynatywne
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Programowanie\UJ\Semestr2\ZPG\PerfCount\cwiczenie\metodynatywne.dll: Can't lo
ad IA 32-bit .dll on a AMD 64-bit platform
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary1(Unknown Source)
at java.lang.ClassLoader.loadLibrary0(Unknown Source)
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at metodynatywne.<clinit>(metodynatywne.java:4)
I used Java 1.4 32 bit javac compiler and java7 x64 compiler both metods gave me the same error. How can I deal with that? Use another c++ compiler if yes how force this compiler to create usable by my java dll file. I working on Windows 7 64 bit.
How I can make from cpp file a 64 bit dll (with gcc) ? Or other comand line compiler ?
Thanks in advance for help.
This is my first blog on SPOJ.
In this problem, I am getting Time Limit Exceeded.
My code is here
Can anyone suggest a better solution? Any help will be well appreciated.
Thanks in advance.
Name |
---|