24,854
社区成员
发帖
与我相关
我的任务
分享
CC = gcc
CFLAGS = -Wall -g -D_STDCALL_SUPPORTED -D_M_IX86
#LIBS = -lglew32 -lfreeglut -lopengl32 -lglu32
LIBS = -lmingw32 -lopengl32 -lglu32 glut32.lib -lopengl32 -lglu32
OBJ = Polaris.exe
SOURCEFILE = Polaris.c
$(OBJ): $(SOURCEFILE)
$(CC) -o $(OBJ) $(SOURCEFILE) $(CFLAGS) $(LIBS)
D:\opengl>make
gcc -o Polaris.exe Polaris.c -Wall -g -D_STDCALL_SUPPORTED -D_M_IX86 -lmingw32 -lopengl32 -lglu32 glut32.lib -lopengl32 -lglu32
Polaris.c: In function 'sierpinsky_render':
Polaris.c:51:24: warning: left-hand operand of comma expression has no effect [-Wunused-value]
Polaris.c:51:2: warning: missing braces around initializer [-Wmissing-braces]
Polaris.c:51:2: warning: (near initialization for 'T[0]') [-Wmissing-braces]
Polaris.c:51:34: warning: left-hand operand of comma expression has no effect [-Wunused-value]
Polaris.c:51:44: warning: left-hand operand of comma expression has no effect [-Wunused-value]
Polaris.c:52:2: warning: implicit declaration of function 'random' [-Wimplicit-function-declaration]
C:\DOCUME~1\123\LOCALS~1\Temp\ccwyj04m.o: In function `sierpinsky_render':
D:\opengl/Polaris.c:52: undefined reference to `random'
D:\opengl/Polaris.c:58: undefined reference to `random'
collect2: ld returned 1 exit status
make: *** [Polaris.exe] Error 1