정말 오래된 소스 코드 (Red Hat에서 컴파일 됨)에서 작업하고 있습니다. lua-4.0.1을 설치하기 전에 최신 lua (lua-5.1.4)를 컴파일하고 이전 디렉토리와 동일한 디렉토리에 설치했습니다. 구현이 그리 크지 않기 때문에 몇 가지 함수 이름을 제외하고는 많이 변경하지 않고 컴파일하려면 "lauxlib.h"를 포함시켜야했습니다. 아무런 문제없이 컴파일되지만 이러한 연결 오류가 발생합니다.lua 4.0.1에서 5.1.4로 업그레이드 할 때 연결 오류가 발생했습니다.
/usr/local/lib/liblua.a(loadlib.o): In function `ll_load':
loadlib.o(.text+0x19): undefined reference to `dlopen'
loadlib.o(.text+0x2a): undefined reference to `dlerror'
/usr/local/lib/liblua.a(loadlib.o): In function `ll_sym':
loadlib.o(.text+0x52): undefined reference to `dlsym'
loadlib.o(.text+0x63): undefined reference to `dlerror'
/usr/local/lib/liblua.a(loadlib.o): In function `ll_unloadlib':
loadlib.o(.text+0x8): undefined reference to `dlclose'
기본적으로 모든 경로는 정확하지만 이전 플래그와 동일한 플래그를 사용합니다. makefile을 전혀 변경하지 않았습니다.
-static -lpthread -lnsl -lutil -ldl -lmysqlclient -llua -llualib -lz -lcppunit
ldl 플래그가 이미 있습니다.
나는 시도할만한 것들을 알고 싶습니다. 모든 것이 인정됩니다. 이것은 나를 미치게 만든다.