这是我第一次编译 C 应用程序。我在 Ubuntu 机器上使用 gcc。教程说要使用语法:
gcc main.c -o HelloWorld
但是我的程序没有“main.c”。
谁能根据下面列出的目录为应用程序推荐命令行?
docs lib License major.awk Makefile README release.awk src WARNING
./docs:
ChangeLog.txt Contributors.txt DataTypes.txt Makefile New_help_needed.txt Porting.txt Readme.txt undoc_file_struct.txt undocumented_df1.txt WARNING.txt
./lib:
attach.c disableforces.c echo.c floatstuff.c Makefile protected_read_2.c protected_write_3.c resetmemory.c typedwrite.c wordblockwrite.c
closefile.c downloaddone.c enableforces.c getedit.c nameconv5.c protected_read_3.c protected_write_4.c senddf1.c uploaddone.c
creatememory.c downloadreq.c fileread.c getstatus.c openfile.c protected_read_4.c readbytesphysical.c setpriv.c uploadreq.c
defs.c dropedit.c filewrite.c libabplc5.h plcmodereq.c protected_write_2.c readsectionsize.c typedread.c wordblockread.c
./src:
absetmode.c abstat.c abtypedread.c abtypedwrite.c abupload.c abwordread.c abwordwrite.c Makefile Makefile.old name.c section.c slcread.c slcwrite.c stress.c
非常感谢。
最佳答案
因为您的顶级目录中有一个 Makefile,只需构建它
make
关于c - 我的第一个 C 编译器是用 gcc 编译的。我使用哪个文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16520533/