Qt4 라이브러리위치가?

litnsio2의 이미지

Qt를 공부하려고하는데 4.0까지 나왔네요..
Qt4만 사용하려고 Qt3를 지우려 했더니 기존에 사용하던 패키지들이 Qt3를 사용하는지라
Qt3 라이브러리를 쉽게 지울수가 없네요..(Qt3 지우고 k3b, kopete..등을 설치하면 의존성
문제로 Qt3를 다시 설치..-0-)

Qt4로 헬로월드 예제를 하나 만들어서 컴파일해보려고 하는데, 라이브러리 링크에러가 납니다.
헤더를

#include <QtGui/QApplication>
#include <QtGui/QPushButton>

이렇게 인클루드했더만 libqt-mt.so 에서 해당클래스를 못찾는듯 싶습니다(include path는 제가 알아서 바꿔가면서
컴파일해봤습니다). 뱉어낸 메시지를 잠깐 보여드리자면,,

---
hello.o: In function `main':
hello.cpp:(.text+0x36): undefined reference to `QApplication::QApplication(int&, char**, int)'
hello.cpp:(.text+0x4a): undefined reference to `QString::fromAscii_helper(char const*, int)'
hello.cpp:(.text+0x67): undefined reference to `QPushButton::QPushButton(QString const&, QWidget*)'
hello.cpp:(.text+0x7f): undefined reference to `QString::free(QString::Data*)'
hello.cpp:(.text+0x111): undefined reference to `QString::free(QString::Data*)'
collect2: ld returned 1 exit status
---

정도가 되겠네요. 아무래도 설치된 라이브러리의 버전이 맞지 않아서라고 예상이 됩니다만,,
제가 리눅스 환경에서의 프로그래밍은 초보자 수준이라 이 이상은 예상할수가 없네요.

/usr/lib에서 ls *qt* 를 해봤을때 qt에 관련된 것이..

---
libqt-mt.so.3.3
libavahi-qt3.so.1.0.1
libqt-mt.so.3.3.6
libqt-mt.la
---

이정도가 나오던데 so 뒤에 붙은 3.3.6이 라이브러리 버전 맞나요..?
그럼 제가 apt로 설치한 qt4 라이브러리들은 당최 어디에 있는것인지..
(edgy 사용중입니다)
/usr/share/qt4 아래에는 라이브러리와 관련된 파일이 없고..

혹시 제가 헛짓을 하고 있는건 아닌지..-_-;;

조언부탁드립니다. 구글링을 해도 원하는 답을 얻을수가 없어서요. ^^;

valentis의 이미지

현재 KDE가 QT4를 지원하지 않으므로 대부분의 리눅스 배포판들이 Qt 3를 사용하고 있습니다.
apt로 설치를 해본적이 없어서 위의 솔류션에 대한 답은 모르겠지만
Qt를 소스코드로 설치한다고 한다면 QTDIR과 LD_LIBRARY_PATH의 환경 변수가 QT 4의 디렉토리에 맞게 설정이 되어있어야 합니다.
QT의 자세한 설치 방법은 제 홈페이지의 서당을 참고하세요.

서영진 입니다.
http://valentis.pe.kr

-------------------------------------

서영진 입니다.
Homepage : http://valentis.pe.kr
blog : http://www.lifeholic.com

falaris의 이미지

저도 우분투 edgy사용하고 있습니다.

ls /usr/lib/*Qt* 하시면 qt4와 관련된 라이브러리 많이 나옵니다.
전 qt3에 대한 라이브러리는 있어도 헤더 파일은 없어서
정확한 답변은 다른분에게로..

그리고 저도 회사에서 단순히 qmake; qmake -project; make로 컴파일 하고 있고,
개인적인 생각 이지만, qmake 정말 좋더군요.(호호)

제가 젠투 사용할 때는 위에 영진님 말씀대로 qte와 qt3을 환경변수 다르게 해서 사용했었습니다.

질문) 우분투 사용자 분들께. apt-get로 설치할 경우 qte같은 경우는 소스리스트에 없는데
직접 컴파일을 해야 하나요?(아시는분 답변 부탁 드려욤~~!@!@~!@)

영진님 근데 책 안나오나요???????????(작년 부터..쭉 기다립니다..)

--------------@@
집에서 젠투교+emacs교 완전 정착!!
회사 데비안(windowsXP)+emacs교 완전 정착!!
(window 저주 하리라 !!!)
나중에 아주 나중에 시간나면 lisp을..

feanor의 이미지

APT로 설치하셨으면 dpkg --list [설치한 패키지 이름] 하시면 패키지에 포함된 모든 파일의 목록이 나올텐데요.

댓글 달기

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