This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: win32: Why exports of JNI_* symbols from _exe_ files
- From: Jeff Sturm <jsturm at one-point dot com>
- To: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- Cc: java at gcc dot gnu dot org
- Date: Tue, 5 Aug 2003 00:03:11 -0400 (EDT)
- Subject: Re: win32: Why exports of JNI_* symbols from _exe_ files
On Tue, 5 Aug 2003, [iso-8859-1] Danny Smith wrote:
> The libarary:
> /* foo.c */
> void __declspec(dllexport) foo()
> { }
>
> The client:
> /* main.c */
> extern __declspec(dllimport) void foo();
> int main()
> {
> foo();
> return 0;
> }
>
> gcc -c foo.c
> gcc main.c foo.o
>
> D:\TEMP/ccWgaaaa.o(.text+0x1f):main.c: undefined reference to `_imp__foo'
Really? This symbol isn't satisfied by a corresponding dllexport within
the same .exe? (If so, I understand even less about declspec than I
previously thought.)
> I'm wondering if the JNIEXP attribute should also be removed from the
> definitions in jni.cc. If you want to specify what goes into a .dll,
> can always use a .DEF file when building the dll (or .exe for that
> matter).
Good point. I presume anyone who needs to make a DLL out of libgcj.a
knows what this means.
Care to submit a patch?
Jeff