undefined reference to function declared in *.h file

后端 未结 4 794
挽巷
挽巷 2020-12-10 16:41

I am a unskilled programmer and new to linux, I run into a problem when complining. I have two files \'ex_addinst.c\' and \'lindo.h\' in the same folder, I input command :

4条回答
  •  爱一瞬间的悲伤
    2020-12-10 17:22

    You need to tell gcc to link with the library or object file(s) that contain the LS... functions you're using. The header file tells the compiler how to call them, but the linker needs to know where to get the compiled code from.

提交回复
热议问题