I am developing JNI DLL files in Delphi 7. The resulting files will be 32 bit DLLs, which do not work on a 64bit Java VM.
Delphi 7 has the possibility to generate c or c++ object files. Is it possible to create a 64bit DLL from these object files with a third party linker?
A shared object file holds code and data suitable to be linked in two contexts. First, the link-editor can process it with other relocatable and shared object files to create other object files. Second, the runtime linker combines it with a dynamic executable file and other shared objects to create a process image.
These files can be loaded into read/write memory, or stored in read-only memory. For example, the Motorola 6800 MIKBUG monitor contains a routine to read an absolute object file (SREC Format) from paper tape. DOS COM files are a more recent example of absolute object files.
Linking is a process of collecting and maintaining piece of code and data into a single file. Linker also links a particular module into system library. It takes object modules from assembler as input and forms an executable file as output for the loader.
Object libraries are collections of related object (. obj) files, such as a set of graphics functions, or the run-time libraries supplied with this compiler. Object libraries are useful for linking them as a single, convenient file, rather than as many separate files.
The Delphi compiler emits 32 bit object code. It doesn't matter how you slice it, that code cannot be linked into a 64 bit module.
At the moment your best bet is to use FreePascal which can produce 64 bit DLLs. There is an upcoming 64 bit version of Delphi but its release date is unknown.
Another option would be to enforce the use of the 32 bit version of the JVM, if that is possible for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With