This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


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

Re: dll, java, gcc, cygwin


Hello all,

>>>>> "MK" == Mumit Khan <khan@xraylith.wisc.edu> writes:

   MK> Whenver loading fails, and you know that it's there, it's typically a
   MK> question of calling the correct "name". For my applications, my load
   MK> routines check for "foo" and "_foo" when asked to load "foo" to avoid
   MK> MSVC vs GCC symbol naming issues.

I notice the difference between the ones that load and those that don't.  

Andrew Mickish's .def has entries in name=name@nn form while yours has them
in name@nn form. When I changed yours to the former and changed the printf
to Andrew's jprintf it works too.  It would be very nice if dlltool was
documented. I keep trying to guess what the syntax means!

Andrew mentions another gotcha. He says that printf will not work because
stdout is not accessible from cygwin's gcc/g++?  Is that correct?  It
definitely crashes with a printf in there on the NT box, but on the Sun
and HP we use gcc/g++ also and have no problem executing printf in our JNI
code. On those machines there is a problem calling printf in routines that
the JNI calls, but in the JNI code itself, it seems to work fine.  What is
the difference?  I noticed your code doesn't use jprintf like Andrew's.
How come?

   MK> Are you creating .def files yourself? Are you checking to make sure
   MK> that the decoration is correct (stdcall attribute adds those pesky
   MK> @[num] at the end of symbols?

No, I let your dllwrap do it.  It creates the name@nn form, and then I go
back and change it to the name=name@nn form by hand and run the stuff that
dllwrap would have done after the .def is created.

Thanks,
Glen.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


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