Re: Invoking gcj compile program from "c"

Andrew Haley <[email protected]>
Newsgroups gmane.comp.gcc.java.devel
Message-ID <[email protected]>
Vaijayanthi Mala Suresh wrote:

> I didn't do any linking explicitly.  I was assuming that if the
> library is placed under /lib folder it will get loaded automatically.

Not by default.  I guess you were trying to use the
`gnu.gcj.runtime.VMClassLoader.library_control' property.

> Later I tried the following before invoking the FindClass()
> 
> 	void *h = dlopen("/lib/libHelloWorld.so", RTLD_LAZY);
> 	if (h == NULL)
> 	{	
> 	     const char *msg = dlerror();		
> 		 printf("VMJ Error %s\n",msg);
>     }
> 
> It returns me an error "File Not Found"

That should work a lot better, but I'm not sure why a "File Not Found"
happens.  I'd try using "strace -f -etrace=file" to see exactly which
file isn't being found.

Andrew.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.