Hello everyone,
This is to remind you that Code Jam Online Round 3 will held tomorrow 14:00 UTC [18:00 MSK]
Good Luck!
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 156 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
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.
Название |
---|