Eckankar / MosGame

An attempt at making a PyGame-like library for Moscow ML.
BSD 3-Clause "New" or "Revised" License
10 stars 1 forks source link

Compile error on 64-bit platforms #1

Closed degeberg closed 11 years ago

degeberg commented 13 years ago

I get the following when trying to compile on 64-bit:

gcc -Dunix -O2 -fno-defer-pop -I/opt/mosml/include `sdl-config --cflags` -c -o obj/display.o -I./C C/display.c 
gcc -Dunix -O2 -fno-defer-pop -I/opt/mosml/include `sdl-config --cflags` -c -o obj/draw.o -I./C C/draw.c 
gcc -Dunix -O2 -fno-defer-pop -I/opt/mosml/include `sdl-config --cflags` -c -o obj/mosgame.o -I./C C/mosgame.c 
gcc -Dunix -O2 -fno-defer-pop -I/opt/mosml/include `sdl-config --cflags` -c -o obj/util.o -I./C C/util.c 
C/util.c: In function ‘Val_addr’:
C/util.c:9:12: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
gcc -Dunix -O2 -fno-defer-pop -I/opt/mosml/include `sdl-config --cflags` -c -o obj/event.o -I./C C/event.c 
gcc -Dunix -O2 -fno-defer-pop -I/opt/mosml/include `sdl-config --cflags` -c -o obj/image.o -I./C C/image.c 
gcc -Dunix -O2 -fno-defer-pop -I/opt/mosml/include `sdl-config --cflags` -c -o obj/surface.o -I./C C/surface.c 
C/surface.c: In function ‘surface_fill’:
C/surface.c:23:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
C/surface.c: In function ‘surface_blit’:
C/surface.c:45:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
C/surface.c:46:27: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
ld -shared `sdl-config --libs` -lSDL_gfx -lSDL_image -o libmosgame.so  obj/display.o  obj/draw.o  obj/mosgame.o  obj/util.o  obj/event.o  obj/image.o  obj/surface.o
ld: obj/display.o: relocation R_X86_64_32 against `.rodata.str1.8' can not be used when making a shared object; recompile with -fPIC
obj/display.o: could not read symbols: Bad value
make: *** [libmosgame.so] Error 
Eckankar commented 11 years ago

I'm not quite sure why you're getting that error. I just compiled and ran MosGame on 64 bit without any problems. Do you still get the same problem?

Eckankar commented 11 years ago

Lately I haven't observed any problems with compilation. If the problem arises again, please re-open the bug.