gtkmm 질문입니다.

shines의 이미지

우분투에서 gtkmm을 사용하기 위해서 libgtkmm-2.4-dev를 패키지로 설치하고

g++ base.cc -o base `pkg-config --cflags gtkmm-2.4 --libs gtkmm-2.4`

이렇게 컴파일을 했더니 아래처럼 에러가 나옵니다.

Package xdmcp was not found in the pkg-config search path.
Perhaps you should add the directory containing `xdmcp.pc'
to the PKG_CONFIG_PATH environment variable
Package 'xdmcp', required by 'X11', not found
base.cc:1:19: error: gtkmm.h: No such file or directory
base.cc: In function ‘int main(int, char**)’:
base.cc:4: error: ‘Gtk’ has not been declared
base.cc:4: error: ‘Main’ was not declared in this scope
base.cc:4: error: expected `;' before ‘kit’
base.cc:5: error: ‘Gtk’ has not been declared
base.cc:5: error: ‘Window’ was not declared in this scope
base.cc:5: error: expected `;' before ‘window’
base.cc:6: error: ‘Gtk’ has not been declared
base.cc:6: error: ‘window’ was not declared in this scope
base.cc:6: error: ‘run’ was not declared in this scope

gtkmm을 하는데 왜 xdmcp를 찾는거죠?
뭐가 문제인지 도무지 모르겠네요. 젠투에서는 별다른 설정도 없이 그냥 gtkmm깔고 바로 된다더군요. xdmcp같은건 필요도 없구..
혹시 우분투에서 gtkmm을 사용하고 계신 분이나 사용해 보신분 계시면 방법좀 알려주세요.

컴파일하려고한 파일은 gtkmm tutorial에 나와있는 기본 예제 파일입니다.

      1 #include <gtkmm.h>
      2
      3 int main(int argc, char *argv[]){
      4         Gtk::Main kit(argc, argv);
      5         Gtk::Window window;
      6         Gtk::Main::run(window);
      7         return 0;
      8 }
Prentice의 이미지

저도 모르겠습니다만 sudo apt-get install libxdmcp-dev 한 번 해보세요.

prolinko의 이미지

저도 gtkmm이랑 xdmcp랑 정확히 어떤 연관이 있는 지는 모르겠지만 xdmcp가 필요한가 보군요.

getntoo의 경우 항상 compile하여 설치하기 떄문에 runtime package와 devel package의 차이가 없습니다. 특정 패키지를 설치하기 위해서는 runtime 의존성 뿐만이 아니라 패키지를 build하기 위해 필요한 패키지에 의존성이 걸립니다. 그래서 gtkmm을 설치하면 개발시 필요한 패키지들까지 알아서 설치가 될 것입니다.

반면 일반적인 debian 패키지의 경우 runtime 의존성에 의해서 패키지를 깔기 때문에 개발시 필요한 패키지들은 설치가 기본으로 되지 않습니다. 따라서 필개발시 필요한 -dev패키지 들은 필요한 것들을 필요시마다 추가 설치를 하셔야 합니다.

shines의 이미지

답변 감사 합니다.

검은해님 말씀처럼 그것만 해주니까 되는군요^^;

댓글 달기

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