How to compile the multithread code with gcc
问题 I have seen the given two makefiles as follows: all: thread1 thread2 thread3 CFLAGS=-I/usr/include/nptl -D_REENTRANT LDFLAGS=-L/usr/lib/nptl -lpthread clean: rm -f thread1 thread2 thread3 ###################### all: thread1 thread2 thread3 CFLAGS=-D_REENTRANT LDFLAGS=-lpthread clean: rm -f thread1 thread2 thread3 Without using makefile, what is the correct command line to compile the thread1.c with gcc? gcc -o thread1 CFLAGS=-I/usr/include/nptl -D_REENTRANT LDFLAGS=-L/usr/lib/nptl -lpthread