From: Pat LaVarre <p_lavarre@ya...> - 2003-01-15 22:38:22
> Why not just use nm on libmsvcrt.a,
> the import library provided by mingw?
Me, I'm looking into substituting .dll's built by
MinGW for .dll's that have been being built lo these
many years with M$VC.
M$VC and/or MinGW gcc is apparently designed to make
this Not work by default? And somehow that makes
sense? More specifically:
> How can an MSVC program call a MinGW DLL, and vice
> versa? ... MSVC will prefix an underscore to
> __stdcall functions while MinGW will not ...
Can someone explain why this conscious incompatibility
is a Good Thing?
I'm building a .dll for Java JNI to call, but I'm too
ignorant to know how to choose from among the many
workarounds that work:
1) gcc -shared -Wl,--add-stdcall-alias -I ...
2) gcc -shared -Wl,--kill-at -I ...
3) gcc -shared -I ... but #undef JNICALL to remove all
uses of __stdcall (except surely Sun put those
__stdcall there for a purpose?)
4) gcc -shared -I ... but #define each exported name
to prepend an underscore (my .h is written by `javah
-jni`, so I can't edit it once and be done)
Various FAQ's on the web suggest more elaborate
procedures that involve more downloads, while
neglecting to explain if/ how/ when/ why I should
prefer those more elaborate procedures.
Unnecessary intricacy might not be an unsurmountable
barrier for ME, but I'm trying to change how some
colleagues work. I'm thinking the more difficult I
make the change, the more people will resist it.
Also I'm thinking the Java Tutorial
should quote how to persuade the gcc of MinGW to work,
not just M$VC, but as yet I'm not sure which
workaround to recommend.
I haven't yet searched this mailing list for answers.
If I do find some, I'll post them back here.
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.