namco
Member
As promised, here's what I did to get development on my Windows 7 machine.
From this link http://www.gp32x.de/board/index.php?/topic/55711-getting-cross-compiling-up-and-running-on-windows/
I followed:
Step 1 (with the exception of installing it to C:/ and not the program files folder - this was just personal preference).
Step 2 was partially followed - mostly by editing the old gp2x makefile. I'm still using the GP2X definitions because I'm too lazy to update!
PROJECT = test
# ---
ifdef GP2X
SYSTEM = gp2x
#EXT = gpe
else
SYSTEM = win32
EXT = exe
endif
BIN = $(PROJECT).$(EXT)
OBJS = $(patsubst _src/%.cpp, build/$(SYSTEM)/%.o, $(wildcard _src/*.cpp))
CFLAGS = -Wall
LDFLAGS = -Wl,--whole-archive -Wl,--no-whole-archive -Wl,--no-undefined -g -lstdc++ -lrt -Wl,-rpath=libs -lts -lSDLmain -lSDL -mwindows
ifdef GP2X
CFLAGS += -fsigned-char -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -Wno-deprecated -Wno-psabi
LIBDIRS = -L"C:/pandora-sdk/lib"
INCDIRS = -I"C:/pandora-sdk/include" -I"C:/pandora-sdk/include/SDL"
CXX = C:/CodeSourcery/"Sourcery G++ Lite"/bin/arm-none-linux-gnueabi-g++.exe
STRIP = C:/CodeSourcery/"Sourcery G++ Lite"/bin/arm-none-linux-gnueabi-strip
else
LIBDIRS = -L"C:/MinGW/lib" -L"C:/SDL-1.2.13/lib" -L"C:/SDL_ttf-2.0.9/lib"
INCDIRS = -I"C:/MinGW/include" -I"C:/SDL-1.2.13/include/SDL" -I"C:/SDL_ttf-2.0.9/"
CXX = C:/MinGW/bin/g++
STRIP = C:/MinGW/bin/strip
endif
ifdef DEBUG
CFLAGS += -D_DEBUG
else
CFLAGS += -fomit-frame-pointer -O3
endif
# ---
all : $(BIN)
$(BIN): $(OBJS)
$(CXX) -o $@ $^ $(LIBDIRS) $(LDFLAGS)
ifndef DEBUG
$(STRIP) $(BIN)
endif
build/$(SYSTEM)/%.o : _src/%.cpp
$(CXX) -o $@ $< $(INCDIRS) -c $(CFLAGS)
.PHONY clean:
@rm -rfv build/$(SYSTEM)/*
@rm -fv $(BIN)
Step 3 was followed but during a test compile it whinged about not finding libc.so.6 so I opened libc.so and amended as so:
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-littlearm)
GROUP ( ./lib/libc.so.6 ./libc_nonshared.a AS_NEEDED ( ./lib/ld-linux.so.3 ) )
and added the lib folder from \20100611-i686-linux-armv7a-linux-gnueabi-toolchain-openpandora\usr\local\angstrom\arm\arm-angstrom-linux-gnueabi\lib to the pandora-sdk\lib file.
After that I think it compiled quite nicely!
From this link http://www.gp32x.de/board/index.php?/topic/55711-getting-cross-compiling-up-and-running-on-windows/
I followed:
Step 1 (with the exception of installing it to C:/ and not the program files folder - this was just personal preference).
Step 2 was partially followed - mostly by editing the old gp2x makefile. I'm still using the GP2X definitions because I'm too lazy to update!
PROJECT = test
# ---
ifdef GP2X
SYSTEM = gp2x
#EXT = gpe
else
SYSTEM = win32
EXT = exe
endif
BIN = $(PROJECT).$(EXT)
OBJS = $(patsubst _src/%.cpp, build/$(SYSTEM)/%.o, $(wildcard _src/*.cpp))
CFLAGS = -Wall
LDFLAGS = -Wl,--whole-archive -Wl,--no-whole-archive -Wl,--no-undefined -g -lstdc++ -lrt -Wl,-rpath=libs -lts -lSDLmain -lSDL -mwindows
ifdef GP2X
CFLAGS += -fsigned-char -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -Wno-deprecated -Wno-psabi
LIBDIRS = -L"C:/pandora-sdk/lib"
INCDIRS = -I"C:/pandora-sdk/include" -I"C:/pandora-sdk/include/SDL"
CXX = C:/CodeSourcery/"Sourcery G++ Lite"/bin/arm-none-linux-gnueabi-g++.exe
STRIP = C:/CodeSourcery/"Sourcery G++ Lite"/bin/arm-none-linux-gnueabi-strip
else
LIBDIRS = -L"C:/MinGW/lib" -L"C:/SDL-1.2.13/lib" -L"C:/SDL_ttf-2.0.9/lib"
INCDIRS = -I"C:/MinGW/include" -I"C:/SDL-1.2.13/include/SDL" -I"C:/SDL_ttf-2.0.9/"
CXX = C:/MinGW/bin/g++
STRIP = C:/MinGW/bin/strip
endif
ifdef DEBUG
CFLAGS += -D_DEBUG
else
CFLAGS += -fomit-frame-pointer -O3
endif
# ---
all : $(BIN)
$(BIN): $(OBJS)
$(CXX) -o $@ $^ $(LIBDIRS) $(LDFLAGS)
ifndef DEBUG
$(STRIP) $(BIN)
endif
build/$(SYSTEM)/%.o : _src/%.cpp
$(CXX) -o $@ $< $(INCDIRS) -c $(CFLAGS)
.PHONY clean:
@rm -rfv build/$(SYSTEM)/*
@rm -fv $(BIN)
Step 3 was followed but during a test compile it whinged about not finding libc.so.6 so I opened libc.so and amended as so:
/* GNU ld script
Use the shared library, but some functions are only in
the static library, so try that secondarily. */
OUTPUT_FORMAT(elf32-littlearm)
GROUP ( ./lib/libc.so.6 ./libc_nonshared.a AS_NEEDED ( ./lib/ld-linux.so.3 ) )
and added the lib folder from \20100611-i686-linux-armv7a-linux-gnueabi-toolchain-openpandora\usr\local\angstrom\arm\arm-angstrom-linux-gnueabi\lib to the pandora-sdk\lib file.
After that I think it compiled quite nicely!
Last edited by a moderator: