gcjh, Headers hierarchy and namespaces

Bryce McKinlay mckinlay@redhat.com
Mon Jul 19 16:06:00 GMT 2004


Florian Bourgier wrote:
> 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 ?

Use <>'s instead of ""'s. ie:
#include <com/eadstelecom/framework/data/AtomicRecord.h>
Then make sure that the base directory (ie the one that contains "com") 
is included with -I when invoking g++.
Regards
Bryce


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /