[질문]gcc에서 라이브러리 패스와 관련하여

익명 사용자의 이미지

안녕하세요.

SUN C/C++ compiler에서는 -R옵션을 사용해서 다음과 같은 기능을 합니다.
-R Pass to linker to specify library search path to the
dynamic linker

이것을 GCC에서 똑같이 수행해야 합니다.
그런데 이런 옵션을 알 수가 없네요.... 꼭 필요합니다.

고수님들 제발 좀 도와주세요..

그럼, 즐거운 하루 되세요....

익명 사용자의 이미지

-L -l

위에서 -L 뒤에 라이브러리 패쓰 경로를, -l 뒤에 라이브러리 네임을 써주시면 됩니다.

예를 들어, QT 라이브러리를 쓴다고 하면

gcc -L/usr/lib/qt/ -lqt ~어쩌고저쩌고

이렇게 하시면 됩니다.
참고가 되셨기를...

익명 사용자의 이미지

지나가는 과객입니다.
제가 보기에도 윗분 답변이
질문내용에 해당하는 제대로 된 답변인 것 같은데
도대체 뭘 물어보는 건지...

익명 사용자의 이미지

어이가 없군요...
나름대로 성의껏 설명을 해놓았더니 그런 식으로 무례하게 말할 수 있는겁니까?
미리 감사할 필요 없을겁니다 아마...

익명 사용자의 이미지

제가 무례했다면 사과드리죠...

저는 지금 개발에 쫓기고 있습니다.

마음이 급해서 그런 모양입니다. 너그럽게 봐주셨으면 합니다.

그리고 제가 질문한 내용에 대해서 답변 주신 것은 감사합니다만..

제가 원하는 답변은 아닌 걸로 알고 있네요...

그럼... 이만

익명 사용자의 이미지

답변 주셔서 감사합니다만.

제가 원하는 답변은 그것이 아니네요...

다시한번 부탁드립니다.

SunOS에서 -R옵션을 사용해보신 분들 답변 부탁드립니다.

미리 감사드리면서

익명 사용자의 이미지

-I(아이) 디렉토리...

gcc -I../include -Wall -c test.c -otest

gcc의 설정값(/usr/include)보다는 먼저 읽는지는 모르겠슴다.

다음은 커널 컴파일시 옵션을 카피해놓은 건데..
보기에는 먼저 읽을 것 같은 생각도 드네요.
gcc -D__KERNEL__ -I/usr/src/linux-2.4.18/include -Wall -Wstrict-
prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-
aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -
march=i586 -DKBUILD_BASENAME=pci -DEXPORT_SYMTAB -c pci.c

댓글 달기

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