| [ CnUnix ] in KIDS 글 쓴 이(By): chunmok (준목) 날 짜 (Date): 2002년 11월 21일 목요일 오후 06시 32분 03초 제 목(Title): [질문]g++에서 string클래스를 인식 못할때 C++ 초보자가 질문합니다. 솔라리스8에 gcc 3.1을 설치해서 g++로 C++소스를 컴파일하려고 합니다. 그런데, STL에 있는 클래스를 인식하지 못하네요. /usr/local/include/g++-v3 디렉토리에 string 화일은 존재하는데... g++을 위한 flag나 옵션이 필요한건 아닌지... 아시는 분의 조언을 부탁드립니다. 참고로, STL이 제대로 설치되었는지 확인하는 방법도 부탁드립니다. 다음 소스와 에러가 에러입니다... $ cat a.cpp #include <string> #include <map> typedef map<string, string, less<string> > MyMap; int main( int argc, char *argv ) { return 0; } $ g++ a.cpp a.cpp:4: `string' was not declared in this scope a.cpp:4: `string' was not declared in this scope a.cpp:4: `less' was not declared in this scope a.cpp:4: `string' was not declared in this scope a.cpp:4: syntax error before `>' token 그래... 다시 시작하는 거야 ... |