On Saturday 21 October 2006 01:09 Maksim Ananjev wrote: > Hi! > > I want to use some types defined in Class.h in translator (nothing > weird here, really?) so I have to include "Сlass.h" into > "DrlVMCompilationInterface.cpp" > > But after having it included I get strange compiler errors. > > /working_vm/vm/include/open/hythread.h:114: error: `I_64' was not > declared in this scope > > Well, I_64 is typedef-ed in platform specific way in hycomp.h, however > this file is included into hythread.h > > /working_vm/vm/vmcore/include/Class.h:1056: error: invalid application > of `sizeof' to incomplete type `TypeDesc' > > ТypeDesc is indeed incomplete here, because its method > "load_type_desc" is defined in "java_type.h" and this file includes > classloader.h, which includes class.h. Looks like kind of cyclic > dependance. > > But Class.h is successfully compiled everywhere but in jit. > > Suggestions. how to fix this? > > Тhanks
It is a VM internal header and is not supposed to be used in other components as Mikhail has explain in another email. But you are right, the dependencies graph of all VM internal headers is a huge tangle which should be untangled somehow. Hopefully the Class.h cleanup which Pavel is doing now will make a first step in the right direction. Currently all headers are protected against double inclusion, but because of this some types may not be defined in some place. If you pick a wrong header in a cyclic dependency you may get itself included once more by its own include dependencies by other headers which rely on this header contents because when the header is included once more it gives no code (double include protection). And this produces a compilation error. -- Gregory Shimansky, Intel Middleware Products Division --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
