This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

One step closer to getting Mohans Test JVM to work


I've reported a bug for the these issues(not sure if there are multiple
issues here).

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12987


I tried the patch referred to in this thread, and my application links,
but it crashes when I try to call one of the functions in the DLL.

http://gcc.gnu.org/ml/java/2003-11/msg00078.html
http://gcc.gnu.org/ml/java/2003-11/msg00078.html
extern "C" 
{
	extern __declspec(dllimport) void runit() ;
}

typedef void (* runitType)();

int main(int argc, char* argv[])
{
	printf("Hello World!\n");

	HMODULE h=LoadLibrary("send.dll");
	
	runitType r=(runitType)GetProcAddress(h, "runit");

// this works
	r();

// this links, but crashes. There is no code at this address.
	runit(); 

	return 0;
}




Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]