Very strange linker behavior

后端 未结 8 2086
猫巷女王i
猫巷女王i 2020-12-07 17:56

This is strange because I was able to get the error below to go away by removing the reference to libm.

gcc -o example example.o -Wl -L/home/kensey/cdev/lib          


        
8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-07 18:27

    Just to add to the list of answers, http://fedoraproject.org/wiki/UnderstandingDSOLinkChange It is informative. It isn't relevant to the question asked above, but, the explanation relates to the error message /usr/bin/ld: note: 'some_reference' is defined in DSO some.so so try adding it to the linker command line

提交回复
热议问题