I did one better, daeken. I just bypassed MSVC++ all together and went for MinGW.
First problem I ran into was a the obvious network protocol include. I threw this into globala.hpp:
Code:
#ifdef WIN32
#include <winsock.h>
#else
#include <netinet/in.h>
#endif /* WIN32 */
That will resolve portability issues with the network.
I had to severely modify the libs in the Makefile
Code:
APP=openeq
SF=src/pfs.o src/ter.o src/draw.o src/ddslib.o src/move.o src/matrix.o src/zon.o src/main.o
CC=g++
LINKER=g++
DFLAGS=
WFLAGS=
COPTS=$(WFLAGS) -g
LINKOPTS=-lzdll -lopengl32 -lSDL -LSDL -lpthreadgc1 -lwsock32
all: $(APP)
$(APP): $(SF)
$(LINKER) $(COPTS) $(OBJS) $^ $(LINKOPTS) -o $@
clean:
erase $(SF) $(APP)
%.o: %.cpp
$(CC) -c $(COPTS) $< -o $@
Note to readers:
I downloaded and installed zlib, SDL, and pthreads by hand. MinGW might come with zlib, but I don't think so. I saw libz32.a in the MinGW\lib directory, but I didn't chance it.
The last thing I had trouble with is a conflict with 'Polygon'. Because I can't remember any easier way to fix this, and my editor has a 'Replace all in files' feature, I simply changed Polygon in the source to OEQPolygon. It apparently conflicts with WINGDIAPI.
Now my only hang-up is:
Quote:
c:/mingw/bin/../lib/gcc-lib/mingw32/3.2.3/../../../libmingw32.a(main.o)(.text+0x
97):main.c: undefined reference to `WinMain@16'
c:\mingw\bin\mingw32-make.exe: *** [openeq] Error 1
|
I've tried changing main in main.cpp to WinMain and still nothing.
I'll keep ya'll posted on what I find.
-- Xorith