[quickfix-developers] gcc 3.21 and Quickfix 1.4 JNI patches
Brought to you by:
orenmnero
|
From: Gene G. <mus...@ya...> - 2003-03-13 16:58:32
|
gcc3.21 (I build on Linux) does not compile qf 1.4 JNI
layer as distrbuted. JVMObject is the primary culprit.
I have attached two patches that deal with that. They
have been tested on gcc 3.21, but I am pretty sure
that they will work on every compiler QF currently
supports.
Below are technical explanation of the errors and
corresponding patches.
1) This compiler does not allow passing non-const
reference to a temporary. This can be fixed by
rewriting initiating assignments as constructors (i.e.
JVMObject a(newMessage()) instead of JVMOBject a =
newMessage()), or changing the JVMOBject copy
constructor to use a const temporary (attached patch
uses latter) This error get flagged in
JavaApplication.cpp and a few other files, fix
requires changes in JVM.h.
2) It does not allow passing non-POD objects ("plain
old data" - pointers,ints etc. and their direct
derivations) through "..." argument. JVMObject is
non-POD. The fix is either to make it POD (derive from
jobject), or cast it to jobject explictly when such
calls are made. Latter is less invasive so that what
my patch does. This error occurs only in
JavaApplication.h.
Gene
__________________________________________________
Do you Yahoo!?
Yahoo! Web Hosting - establish your business online
http://webhosting.yahoo.com |