gcc 에러좀 봐 주세요.

shim1212의 이미지

gcc 에러좀 봐 주셨으면 합니다.
에러는 다음과 같고요.
make를 통해 컴파일한 프로그램입니다.
gcc 버전은 3.4.6이고 리눅스는 젠투를 쓰고 있습니다.
컴파일 화면은
make[1]: Entering directory `/data/home/shim1331/nw/src'
gcc-3.4.6 -c -g -O -Wall -march=prescott comm.c
자식프로세스 0x0807f290 (comm.o) PID 26240을(를) 체인에 넣습니다.
살아있는 자식 프로세스 0x0807f290 (comm.o) PID 26240
In file included from comm.c:29:
utils.h:42: warning: conflicting types for built-in function 'log'
In file included from comm.c:30:
comm.h:77:2: invalid preprocessing directive #ef
In file included from comm.c:30:
comm.h:79: error: conflicting types for 'fcntl'
comm.h:79: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
/usr/include/fcntl.h:76: error: previous declaration of 'fcntl' was here
comm.h:79: error: conflicting types for 'fcntl'
comm.h:79: note: a parameter list with an ellipsis can't match an empty parameter name list declaration
/usr/include/fcntl.h:76: error: previous declaration of 'fcntl' was here
comm.h:138:24: warning: no newline at end of file
comm.c: In function `update_blood':
comm.c:857: warning: use of cast expressions as lvalues is deprecated
comm.c: In function `make_prompt':
comm.c:1208: warning: suggest explicit braces to avoid ambiguous `else'
comm.c:1214: warning: suggest explicit braces to avoid ambiguous `else'
comm.c:1219: warning: suggest explicit braces to avoid ambiguous `else'
comm.c: In function `send_to_arena':
comm.c:2138: warning: left shift count >= width of type
실패한 자식 프로세스 0x0807f290 PID 26240 을(를) 거둬들입니다
make[1]: *** [comm.o] 오류 1
Removing child 0x0807f290 PID 26240 from chain.
make[1]: Leaving directory `/data/home/shim1331/nw/src'
실패한 자식 프로세스 0x08086cb8 PID 26239 을(를) 거둬들입니다
make: *** [default] 오류 2
Removing child 0x08086cb8 PID 26239 from chain.
인대 헤더를 살펴보면 다음과같이 정의되어 있습니다.

#ifndef fcntl
int fcntl();
그리고 #endif로 마무리
좀더 많은 정보가 필요하시면 gmail shim11161로 메일 보내주셔도 되고요.
지금 이것때문에 정말 골치가 아프네요.
예전 gcc-3.3.6 때는 안그랬는대.
실행파일 용량도 전에는 2.2mb였는대 새로 컴파일 된거는 1.1mb정도이니

antaran의 이미지

컴파일 관련한 질문을 보면 과연 얼마나 컴파일러의 에러 메시지와 씨름을 하고 올리는 것인가

하는 생각이 종종 듭니다. 컴파일러의 버그나 혹은 C/C++ 규약상의 미흡한 점 등을 질문을 통해 배운적도

있긴 합니다만 극히 드물 따름이지요.

그냥 살짝 훑어보니 'comm.h:77:2: invalid preprocessing directive #ef' 이런 게 보이네요.

#ef가 뭘 쓰시다가 오타가 난 것인지는 모르겠으나 이런류의 오류는 컴파일러의 에러/워닝 메시지만

하나하나 찾아서 해결하시면 됩니다. 하나씩 소스의 해당 라인을 보시고 스스로 해결해 보시지요.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.