Here is the makefile:
CC = g++
LD = g++
CFLAGS = -I/usr/X11R6/include -I. -c
LDFLAGS = -L/usr/X11R6/lib -lglut -lGLU -lGL -lXi -lXmu -lXt -lXext -lX11 -lSM -lICE -lm
INCS =
OBJS = x.o
all: x
clean:
rm -rf $(OBJS) x
cgRender.o: $(INCS) x.cpp
$(CC) $(CFLAGS) x.cpp -o x.o
cgRender: $(OBJS)
$(LD) $(OBJS) -o x $(LDFLAGS)
Its made for Linux but I’m trying to compile it on windows.
The errors I keep getting look like this:
c:/strawberry/c/bin/*directories that don't exist/i686-w64-mingw32/bin/ld.exe: cannot find -lGlu/-lGl/-lXi/etc....
If somebody could help me out here, I’d be very appreciative. Thanks
In Windows you normaly don’t link against X11 libraries, so remove all the
-lX…,-lSMand-lICE. Also remove the X11 include and library directory parameters-I/usr/X11R6/include,-L/usr/X11R6/lib.Note that this Makefile must be really old, because neither those libraries, nor the directories should require explicit mentioning to the compiler or linker, as GLUT pulls the libraries as dynamic library dependency.