Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在ubuntu下make编译,发现一个bug #22

Open
pinkbin opened this issue Jan 4, 2014 · 6 comments
Open

在ubuntu下make编译,发现一个bug #22

pinkbin opened this issue Jan 4, 2014 · 6 comments

Comments

@pinkbin
Copy link

pinkbin commented Jan 4, 2014

系统环境: ubuntu13.10

在编译的时候,报错
/usr/bin/ld: /usr/local/lib/liblua.a(loadlib.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line

然后,在makefile中加入了 -ldl 这句话,就好使了。
似乎只是一个未链接库的问题。

@hanxi
Copy link

hanxi commented Jan 13, 2014

我也出现了。。。好像有的gcc会自动带-ldl吧。。。加-ldl就OK了。

@githuborge
Copy link

恩,确实,makefile 里面就linux 的没有加,其他的选项都有。

@illutheplanet
Copy link

请问是在makefile的哪一句后加-ldl……

@hanxi
Copy link

hanxi commented Apr 8, 2018

@DZY122
Copy link

DZY122 commented May 24, 2022

makefile在哪里找啊

@suozi
Copy link

suozi commented Oct 11, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants