by Leozheng @ SRMVision
CMake?Make?Makefile?(Tips, to learn these, better have a general understanding of preprocessing - compiling - assembly - linking, and that's how a C program from 0 to 1.)
Also, the "Four-Steps-Bagu" of installing a cmake-based package:
mkdir build && cd build
cmake ..
make -j8
make install
Make sure to understand all the processes and meanings of these commands.
所以今天,咱来讲:
今天的四个Part,三个工具,一个理论
So...还是那句老话,工具我是不学的,会用就行。
入门要求:做到基本了解,会用就行。
进阶要求(我觉得入队至少):
讲到最后,还是怎么学CS......
还有一些其他常用的工具
在 IDE 里,为什么按一个键,就能编译运行?
./a.out背后是通过调用命令行工具完成的
gcc --help; man gcc
-E, -S, -c
当然我只讲最基本的东西。
上手就行、、、
标准规定 C 程序从 main 开始执行
int main(int argc, char *argv[]);
ls -al (argc = 2, argv = ["ls", "-al", NULL])以下代码有什么区别?
#include <stdio.h>
#include "stdio.h"
为什么在没有安装库时会发生错误?
#include <SDL2/SDL2.h>
你可能在书/阅读材料上了解过一些相关的知识
gcc --verbose a.c == gcc -v a.c宏展开:通过复制/粘贴改变代码的形态
#include → 粘贴文件#include, #define, ...)@ SRMVision