undefined reference 'shm_open', already add -lrt flag here

前端 未结 3 1758
粉色の甜心
粉色の甜心 2020-11-29 09:23

I just have a system crash and reinstall Ubuntu 11.10, and my code produces this strange error.

I wrote a simple code sample to test where the problem is:

         


        
3条回答
  •  迷失自我
    2020-11-29 09:36

    In Expert C programming Page 108: Where to Put Library Options:Always put the -l library options at the rightmost end of your compilation command line. But it doesn't tell why, so i guess this is somewhat a rule?:)

提交回复
热议问题