老师,请教个问题,我用的是ubuntu ,安装了个基本c/c++开发环境
我写了两个文件sort.c和hello.c并且在hello.c中调用了sort.c 头文件中也引入了,但是提示找不到 sort.c 这个是不是需要安装什么插件?
> gcc -c sort.c -o sort.o
> gcc -c hello.c -o hello.o
> gcc sort.o hello.o -o hello
或者一句:
> gcc sort.c hello.c -o hello
不需要 只要代码是对的 把这两个代码一起编译链接
把sort编译进链接