[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Precompiled headers don't seem to work with GNU ObjC (was New precompile
From: |
Nicola Pero |
Subject: |
Precompiled headers don't seem to work with GNU ObjC (was New precompiled headers support in gnustep-make) |
Date: |
Tue, 16 Jan 2007 05:28:48 +0100 (CET) |
> I implemented (experimental) precompiled headers support in gnustep-make.
Unfortunately, with my compiler (4.1.1 20070105 (Red Hat 4.1.1-51)) I can't get
precompiled ObjC headers to work. :-(
It works fine for C headers, but it doesn't seem to work for ObjC headers.
In attach a couple of files, test.h and test.m.
If I compile them the standard way --
gcc test.m -lobjc
it all works.
If I first precompile test.h
gcc -x objective-x-header test.h
I get the test.h.gch file, which looks ok, but then compiling fails --
gcc test.m -lobjc
test.m:4: warning: cannot find interface declaration for �TestClass�
test.m:4: error: redefinition of �struct TestClass�
(compilation aborts)
Using the -H option to gcc you can indeed confirm that compilation fails iff the
precompiled ObjC header is used.
It seems that ObjC class declarations in ObjC headers are not read correctly/at
all from precompiled headers (C stuff works fine instead!). Very
disappointing. :-(
Am I missing some GCC option ? It's late night. ;-)
Thanks
test.h
Description: Text Data
test.m
Description: Text Data
- Precompiled headers don't seem to work with GNU ObjC (was New precompiled headers support in gnustep-make),
Nicola Pero <=