undefined reference to `crypt'

后端 未结 4 1076
既然无缘
既然无缘 2021-01-12 08:27

I am using the below code that i found somewhere in the net and i am getting an error when i try to build it. The compilation is ok.

Here is the error:



        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-12 08:37

    crypt.c:(.text+0xf1): undefined reference to 'crypt' is a linker error.

    Try linking with -lcrypt : gcc crypt.c -lcrypt.

提交回复
热议问题