문제

내 컴파일러 : XLC 버전 10.1 환경 : AIX5.3 링커 : LD

내가 Linux에서 일할 때 GCC (4.4.1) 다음 옵션을 사용합니다

-Wl,-rpath

(링커 옵션의 경우 -wl) 런타임 라이브러리 검색 경로에 디렉토리를 추가합니다.

XLC 컴파일러와 동등한 것은 무엇입니까?

또는 동등한 것은 무엇입니까? -RPATH 링커를 위해.

고맙습니다.

도움이 되었습니까?

해결책

첫 번째 대답은 다음과 같습니다. 해당 AIX 링커 옵션입니다 -blibpath. (도움이 있다면 Sun Compiler의 경우 -R. 만약에 따라!)

이제 OP의 의견에 응답하기 위해 편집했습니다. 맞아요. 실제로 AIX 링커 매뉴얼을 읽습니다 (man ld) -L 이미 올바른 옵션입니다!

   -LDirectory
        Adds Directory to the list of search directories used for finding
        libraries designated by the -l (lowercase letter L) flag. The list
        of directories, including the standard library directories, is
        also recorded in the output object file loader section for use by
        the system loader unless you use the -blibpath, -bnolibpath, or
        -bsvr4 option. You can repeat this flag.
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top