Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Compile the Dynamic or Shared Object Library ?!  RSS feed

 
Oz Kron
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello again
I want to run a simple JNI example
I do all that is written here
web page

but I can't figure out how to compile the Dynamic in Windows
What is cl -Ic:/jdk1.2/include
-Ic:/jdk1.2/include/win32
-LD nativelib.c -Felibnative.dll
?!
and I have GCC and so on from MINGW, but what is cl and so on?
Can some one please explain me how to run it on windows xp please?
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never heard of MINGW, but if you go to their website and look a their FAQ, there's an entry that you may find interesting: How can a JNI DLL be created?
 
Oz Kron
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I mean that I am using GCC in widnows
How can I do the compile?
Did someone do it and can explain me please?
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you read the FAQ entry?
 
Oz Kron
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep I have read it
Can someone here just put a small example or something to help me out here?
I am sure there is a lot of people that use JNI and GCC in Windows, not?
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So what part of the FAQ entry are you having trouble with? It tells you exactly what you need to type in if you are using MSYS (which i assume is a bash prompt) or the standard windows console. There's not much more to tell you other than "type in the command that the FAQ tells you to".
 
Oz Kron
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the GCC with windows command com
the problem is that I just don't under stand it
for exmaple the "\" is "/" like in linux
and so on
It just seem real old and no update to new Java JDK
 
Joe Ess
Bartender
Posts: 9425
12
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can't expect people to update their examples for every iteration of the JDK. Sometimes you have to read the documentation, figure out what's going on and try to apply it to your particular environment. Did you try changing the command line as given to your environment? What happened?
 
Henry Wong
author
Sheriff
Posts: 23275
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Oz Kron:
I am using the GCC with windows command com
the problem is that I just don't under stand it
for exmaple the "\" is "/" like in linux
and so on
It just seem real old and no update to new Java JDK


What's wrong with supporting the "/" for windows? Many programs, particularly multiplatform ones, allow you to use either "\" or "/" to specify the file delimiter. Maybe this is one of those programs.

As for the age of the JDK. It must be pointed out that the JNI interface hasn't changed in a very long time. It certainly has changed since Java 1.4.1.

Henry
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Henry Wong:
It certainly has not changed since Java 1.4.1.


I'm sure Henry meant to say "has not".
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!