[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to avoid "warning: #import is obsolete"
From: |
Nicola Pero |
Subject: |
Re: How to avoid "warning: #import is obsolete" |
Date: |
Mon, 7 Jul 2003 11:03:59 +0100 (BST) |
> Hi all,
>
> ...
> Compiling file FBRelationCarrier.m ...
> FBRelationCarrier.m:3:2: warning: #import is obsolete, use an #ifndef
> wrapper in the header file
> Compiling file FBDataExtension.m ...
> FBDataExtension.m:3:2: warning: #import is obsolete, use an #ifndef
> wrapper in the header file
> Compiling file FBErrorManager.m ...
> FBErrorManager.m:3:2: warning: #import is obsolete, use an #ifndef
> wrapper in the header file
> Compiling file FBStringExtension.m ...
> FBStringExtension.m:3:2: warning: #import is obsolete, use an #ifndef
> wrapper in the header file
> ...
>
> please, how can this be suppressed. I found an article abiut this issue
> mentioning -Wimport. Where do I have to put or delete this string to
> avoid these warnings? Thanks a lot!
The GCC flag to suppress the warning is -Wno-import. You can have
gnustep-make add the flag automatically for you if you configure
gnustep-make with the option '--enable-import' (as in: ./configure
--enable-import when configuring gnustep-make). Otherwise, you can edit
by hand
/opt/GNUstep/System/Library/Makefiles/config.make
setting the variable OBJC_NO_IMPORT_FLAGS to -Wno-import, as in the
following example -
#
# Binary and compile tools
#
CC = gcc
OPTFLAG = -O2
CPPFLAGS =
OBJC_NO_IMPORT_FLAGS = -Wno-import
CPP = gcc -E