D
Dan
Hi All,
I've got a problem with my C++ application that calls a Java class
that I've built with GCJ, I can't run it because I get errors:
multiple definition of `atexit'
first defined here
multiple definition of `_onexit'
first defined here
multiple definition of `__do_sjlj_init'
first defined here
BFD 2.15.91 20040904 assertion fail ../../src/bfd/cofflink.c:2269
illegal symbol index 1091667985 in relocs
ld returned 1 exit status
D:\Dev\Interceptor\Prototypes\CPP\JavaExperiment\Makefile.win [Build
Error] [JavaExperiment.exe] Error 1
Some background information:
I've written a very simple class in Java with a single method call in
it, I complied this to an object file (.o) using GCJ and then
generated a C++ header file using GCJH.
gcj -shared -o NewClass.o NewClass.java
gcjh NewClass
I'm developing the C++ component in Dev C++ so I've added the .o file
as a reference and included the .h file.
The C++ file is really simple:
#include <cstdlib>
#include <iostream>
#include <gcj/cni.h>
#include "NewClass.h"
using namespace std;
int main(int argc, char *argv[])
{
system("PAUSE");
return EXIT_SUCCESS;
}
Is there some option I am missing in perhaps GCJ to stop it from
creating the atexit function? It all builds fine when I remove the
reference to my .o file.
Any help would be greatly appreciated...
Cheers,
Dan Alexander.
I've got a problem with my C++ application that calls a Java class
that I've built with GCJ, I can't run it because I get errors:
multiple definition of `atexit'
first defined here
multiple definition of `_onexit'
first defined here
multiple definition of `__do_sjlj_init'
first defined here
BFD 2.15.91 20040904 assertion fail ../../src/bfd/cofflink.c:2269
illegal symbol index 1091667985 in relocs
ld returned 1 exit status
D:\Dev\Interceptor\Prototypes\CPP\JavaExperiment\Makefile.win [Build
Error] [JavaExperiment.exe] Error 1
Some background information:
I've written a very simple class in Java with a single method call in
it, I complied this to an object file (.o) using GCJ and then
generated a C++ header file using GCJH.
gcj -shared -o NewClass.o NewClass.java
gcjh NewClass
I'm developing the C++ component in Dev C++ so I've added the .o file
as a reference and included the .h file.
The C++ file is really simple:
#include <cstdlib>
#include <iostream>
#include <gcj/cni.h>
#include "NewClass.h"
using namespace std;
int main(int argc, char *argv[])
{
system("PAUSE");
return EXIT_SUCCESS;
}
Is there some option I am missing in perhaps GCJ to stop it from
creating the atexit function? It all builds fine when I remove the
reference to my .o file.
Any help would be greatly appreciated...
Cheers,
Dan Alexander.