Kohonen의 원본 som 구현을 사용하려고하지만 vcal을 사용하여 세그먼트 오류 오류가 발생합니다.현재 gcc가있는 som_pak (97) 컴파일
그것은 당신이 http://cis.legacy.ics.tkk.fi/hynde/lvq/ 만에 발견이 오류를 수정 비공식 버전을 사용할 수 있음을 밝혀 그 1997 년, 나는이 오류
을 받고 있어요 그래서 CC 컴파일러에 많은 변화가 있다는 것을 확신 이 코드를 recomple하기 위해 할 수있는 일이[email protected]:~/bin/som/som_pak-3.2$ make gcc -O2 -c -o vcal.o vcal.c In file included from datafile.h:28, from vcal.c:26: fileio.h:69: error: conflicting types for ‘getline’ /usr/include/stdio.h:651: note: previous declaration of ‘getline’ was here make: *** [vcal.o] Error 1 [email protected]:~/bin/som/som_pak-3.2$
파일 datafile.h
1:#ifndef SOMPAK_DATAFILE_H 2:#define SOMPAK_DATAFILE_H ... 24:#include 25:#include 26:#include "lvq_pak.h" 27:#include "errors.h" 28:#include "fileio.h"
있습니까?
['getline()'] (http://pubs.opengroup.org/onlinepubs/9699919799/functions/getline.html)은 이제 POSIX 함수입니다. 가장 좋은 방법은'fileio.h '에있는 함수의 이름을 바꾸고,'#undef getline'과'#define getline (a, b, c) 'getline'의 출현 전과'#include'의 뒤의'file_h'의 som_getline (a, b, c) 올바른 수의 매개 변수를 사용하거나'#define getline (...) som_getline (__ VA_ARGS __)'). ''이 아직 포함되어 있지 않으면'getline()'이 정상적으로 선언되고 매크로에 의해 매핑되도록 추가하십시오. –
고마워요. 완벽하게 작동했습니다! –