undefined reference to

后端 未结 1 1449
再見小時候
再見小時候 2021-02-12 14:22

I have this simple test file:

#include \"stack.h\"

int main()
{
  Stack* stck = init_stack();

  return 0;
}

and stack.h is defin

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-12 14:33

     gcc -o testit teststack.c stack.c
    

    You need to compile both C source files and link the object files; this does it all in one command.

    0 讨论(0)
提交回复
热议问题