undefined reference to main issue

后端 未结 3 1752
感动是毒
感动是毒 2021-01-22 20:03

I have written a c code file called \"utilfunc.c\" this code contains my functions that I will use through my code.

Now when I am compiling my \"utilfunc.c\" file an

3条回答
  •  感动是毒
    2021-01-22 20:50

    Depending on the options you give the compiler (you didn't show any, so I can't say specifically about yours), the compiler/linker will try to build a whole application, in which case it would need main defined. But you can provide different options to tell it to just compile the file given, and stop there, which sounds like what you want.

提交回复
热议问题