www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Link to C library

reply "monnoroch" <monnoroch gmail.com> writes:
I can't link to libjvm.so.
Here's my code:

extern (C) {
	int JNI_CreateJavaVM(void ** pvm, void ** penv, void * args);

void main() {
	writefln("0x%x", &.JNI_CreateJavaVM);

Which ptints wrong stuff. When then i use it and check the
contents of **pvm is also prints wrong stuff full of zeroes, but
the result is 0(JNI_OK).

I build it with:
dmd -m64 main.d -I. -L-ljvm -debug.

Any suggestions?
Jun 19 2014
parent "monnoroch" <monnoroch gmail.com> writes:
Oh, found a problem, it was about one more layer of pointer
Jun 19 2014