리눅스(우분투) 프로그래밍 관련 질문 이니다 .

ldh8765의 이미지

우분투 리눅스 8.04 버전을 사용하고 있고요

http://www.i-scream.org/libstatgrab의

libstatgrab 를 사용하여 프로그래밍을 하려고 하고있습니다.

이 라이브러리는 설치를 완료 하였습니다 ..

압축해제 후 ./configure >> make 하였습니다 .

예제프로그램이 있어서 실행을 시켜보니 실행이 아주 잘 되고 있습니다 ...

예제프로그램폴더에 오브젝트파일이랑 c 파일이랑 실행 파일까지 모두 있고요

제가 예제프로그램의 한 c 코드를 을 고대로 복사해서 다른 폴더에 넣어 두고서

새로 컴파일을 해보았는데요 라이브러리 함수에서 언디파인 레퍼런스가 나옵니다 ..

제 생각에는 헤더파일 지정시에

#include stdio.h
#include statgrab.h
#include stdlib.h
#include unistd.h

이 부분인데 헤더를 못찾는것 같기도 하고

Q1 ) libstatgrab 가 설치 되어있는지 / 어느곳에 설치되어 있는지 어떻게 확인해봐야 할까요
Q2 ) statgrab.h 를 복사해서 프로그램이 다른폴더에 넣고 "statgrab.h" 를 사용하니까
언디파인 레퍼런스가 몇 개 줄어들었습니다 ... 그런데 다시 지우고 다시 컴파일해보면
줄어든 언디파인 레퍼런스메세지가 줄어 들어 있습니다
Q3) 위의 방식으로 설치한 프로그램은 어떻게 해서 삭제를 해야 하나요 ??

test.o: In function `main':
test.c:(.text+0x9): undefined reference to `sg_init'
test.c:(.text+0xe): undefined reference to `sg_drop_privileges'
test.c:(.text+0x33): undefined reference to `sg_get_host_info'

이런식으로요

저 함수들이 선언된곳이 소스내에 없어서 실행이 안된다는 것 같은데 이것 저것 복잡하네요 ...;;

도움좀 부탁 드릴께요 참고로 파일소스 업로드 해둘께요 ;;

File attachments: 
첨부파일 크기
Package icon examples.zip157.65 KB

댓글 달기

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
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.