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 | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
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 |
---|