gcjh, Headers hierarchy and namespaces
Florian Bourgier
fbourgier@sycomore-multimedia.com
Mon Jul 19 14:21:00 GMT 2004
Hello,
I am working under cygwin. I had Java classesI want to convert to
binary format. I used gcj and it I managed to obtained binary files. Now
I want to create a C++ application that is using the classes I converted.
First, I use gcjh to generate headers to be included in C++ applications
files. But there is a problem.
Here an extract of an header I got :
#ifndef __com_eadstelecom_framework_data_AtomicRecord__
#define __com_eadstelecom_framework_data_AtomicRecord__
#pragma interface
#include <com/eadstelecom/framework/util/Lockable.h>
extern "Java"
{
namespace com
{
namespace eadstelecom
{
namespace framework
{
namespace data
{
class AtomicRecord;
}
namespace util
{
namespace io
{
class BitSerializableI;
class BitArrayOutputStream;
class BitArrayInputStream;
}
}
namespace application
{
namespace profile
{
class CompositeRecordProfile;
class AtomicRecordProfile;
}
}
}
}
}
};
Indeed, my Java classes were organized in package and I had a tree. So I
would have liekd to keep the same tree for the headers. But when I want
to include a file like this :
#include "AtomicRecord.h"
int main()
{}
the headers cannot be found. And if I write
"D:\test\Partie3-Envt_natif\gcj-gcjh\com\eadstelecom\framework\data\AtomicRecord.h"
Then I have the error that Lockable cannot be found un com/eads/etc...
How can I solve this ?
Can I keep my tree ? I have to because if not, there will be classes
with the same name and this is impossible .
How can I say to search under a directory for the headers ?
Thanks for your help.
Regards,
Florian BOURGIER
More information about the Java
mailing list