#import라는 단어(?)는 어디서 쓰는건가여?(어느 언어?)
글쓴이: hys545 / 작성시간: 일, 2005/02/13 - 11:38오후
opendarwin의 project중의
odcctools를 컴파일하는중에
include/libstuff/print.h
/*
* Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. Please obtain a copy of the License at
* http://www.opensource.apple.com/apsl/ and read it before using this
* file.
*
* The Original Code and all software distributed under the License are
* distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
* EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
* INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
* Please see the License for the specific language governing rights and
* limitations under the License.
*
* @APPLE_LICENSE_HEADER_END@
*/
#if defined(__MWERKS__) && !defined(__private_extern__)
#define __private_extern__ __declspec(private_extern)
#endif
#import <stdarg.h>
__private_extern__ void print(
const char *format, ...)
#ifdef __GNUC__
__attribute__ ((format (printf, 1, 2)))
#endif
;
__private_extern__ void vprint(
const char *format, va_list ap);
그런데 #import를 #include로 바꾸니까 전에 에러나던ㄷ게 업어지는거로 보아
include와 같은거 같은데
도대채 저 import는 어디서 사용하는건지 궁금
Forums:


gcc info 매뉴얼에 따르면, #import는 Objective-C에
gcc info 매뉴얼에 따르면, #import는 Objective-C에서 쓰이는 preprocessor directive로, 헤더 파일을 딱 한번만 포함시키는 목적으로 쓴다고 합니다.
C 언어나 C++에서 쓰는 것은 비표준입니다. (gcc, vc 7.1이상)
또한 #import는 썩 훌륭히 설계된 것이 아니며, #ifdef.. 를 써서 한 번만 포함시키게 하는 것이 훨씬 낫다고 씌여 있습니다. 아뭏든.. 별로 권장되지 않는 모양입니다.
C FAQ: http://www.eskimo.com/~scs/C-faq/top.html
Korean Ver: http://cinsk.github.io/cfaqs/
JAVA
JAVA
남으로 창을 내겠소.
밭이 한참갈이 괭이로 파고 호미론 김을 메지요.
구름이 꼬인다 갈리있소. 새들의 노래는 공으로 들으랴오.
강냉이가 익거든 와자셔도 좋소.
왜 사냐건 웃지요.
댓글 달기