cant compile pmars 0.9.5-2 on os x
Anonymous
Archived from groups: rec.games.corewar (More info?)
(01:42 Shodan:ollie)
src/$ cat Makefile && make
*****************MAKE FILE*************************
# generic UNIX makefile
CC = gcc-3.3 # req. for linux
#CC = cc # if you don't have gcc
# Configuration options:
#
# No. Name Incompatible with Description
# (1) -DSERVER 2 disables cdb debugger (koth
server
# version)
# (2) -DGRAPHX 1 enables platform specific
core
# graphics
# (3) -DKEYPRESS only for curses display on
SysV:
# enter cdb upon keypress
(use if
# Ctrl-C doesn't work)
# (4) -DEXT94 ICWS'94 + SEQ,SNE,NOP,*,{,}
# (5) -DSMALLMEM 16-bit addresses, less
memory
# (6) -DXWINGRAPHX 1 X-Windows graphics (UNIX)
# (7) -DPERMUTATE enables -P switch
# (8) -DSDLGRAPHX 1 SDL graphics (generic)
#DBG = -g -W -Wall -pg
CFLAGS = -O -DEXT94 -DXWINGRAPHX -L/usr/X11R6/include -DPERMUTATE
LFLAGS = -x
# LIB = -lcurses -ltermlib # enable this one for curses
display
# LIB = -lvgagl -lvga # enable this one for
Linux/SVGA
LIB = -L/usr/X11R6/lib -L/usr/X11R6/include/X11 #
enable this one for X11
# INC = `sdl-config --cflags` # enable this one for SDL
graphics
# LIB = `sdl-config --libs` # enable this one for SDL
graphics
EXESUFFIX=
..SUFFIXES: .o .c .c~ .man .doc .6
MAINFILE = pmars$(EXESUFFIX)
HEADER = global.h config.h asm.h sim.h
OBJ1 = pmars.o asm.o eval.o disasm.o cdb.o sim.o pos.o
OBJ2 = clparse.o global.o token.o
OBJ3 = str_eng.o
all: flags $(MAINFILE)
flags:
@echo Making $(MAINFILE) with compiler flags $(CFLAGS)
$(MAINFILE): $(OBJ1) $(OBJ2) $(OBJ3)
@echo Linking $(MAINFILE)
@$(CC) $(CFLAGS) -o $(MAINFILE) $(OBJ1) $(OBJ2) $(OBJ3) $(LIB)
@strip $(MAINFILE)
@echo done
token.o asm.o disasm.o: asm.h
sim.o cdb.o pos.o disasm.o: sim.h
sim.o: curdisp.c uidisp.c sdldisp.c lnxdisp.c xwindisp.c
xwindisp.c: xwindisp.h pmarsicn.h
lnxdisp.c: lnxdisp.h
$(OBJ1) $(OBJ2) $(OBJ3): Makefile config.h global.h
..c.o:
@echo Compiling $*.o
@$(CC) $(CFLAGS) -c $*.c
clean:
rm -f $(OBJ1) $(OBJ2) $(OBJ3) core
***************MAKE*************************
Making pmars with compiler flags -O -DEXT94 -DXWINGRAPHX
-L/usr/X11R6/include -DPERMUTATE
Compiling pmars.o
Compiling asm.o
Compiling eval.o
Compiling disasm.o
Compiling cdb.o
Compiling sim.o
Compiling pos.o
Compiling clparse.o
Compiling global.o
Compiling token.o
Compiling str_eng.o
Linking pmars
ld: Undefined symbols:
_XAllocClassHint
_XAllocColor
_XAllocSizeHints
_XAllocWMHints
_XChangeWindowAttributes
_XCheckMaskEvent
_XClearWindow
_XCloseDisplay
_XCopyArea
_XCopyColormapAndFree
_XCreateBitmapFromData
_XCreateFontCursor
_XCreateGC
_XCreatePixmap
_XCreateSimpleWindow
_XDefineCursor
_XDisplayName
_XDrawLine
_XDrawPoint
_XDrawRectangle
_XDrawString
_XFillRectangle
_XFreePixmap
_XLoadQueryFont
_XLookupString
_XMapWindow
_XMatchVisualInfo
_XNextEvent
_XOpenDisplay
_XParseColor
_XResizeWindow
_XSelectInput
_XSetBackground
_XSetFont
_XSetForeground
_XSetLineAttributes
_XSetWMProperties
_XSetWindowColormap
_XStringListToTextProperty
_XWarpPointer
_sighandler
make: *** [pmars] Error 1
(01:43 Shodan:ollie)
src/$
help. why cant i compile (i thought it was a problem with having
xfree86 libs (or lack of) but i've installed them now (probably
incorrectly...) but it still refuses to compile.
if you dont know what pmars is, its a corewars simulator. corewars is a
game where you write your own 'warriors' in pseudo assembler and then
pit them in battle for king of the hill. much fun. i was using the
corewars package avaliable via fink (fink install corewars) but that
seems to have issues with some perfectly valid code. and pmars is the
official thing... however, it doesnt want to run (i want X. i did
manage to compile it as a server without issues.)
when i installed the xfree86-shlibs package it bitched at me about not
wanting to install till i removed the old ones. so i just moved them to
another dir (probably not the best idea, frustrated.) but yeah, doesnt
want to compile.
i'm probably just missing a -L/usr/something/somethingelse in the make
file.
anyone??
passes out.
(01:42 Shodan:ollie)
src/$ cat Makefile && make
*****************MAKE FILE*************************
# generic UNIX makefile
CC = gcc-3.3 # req. for linux
#CC = cc # if you don't have gcc
# Configuration options:
#
# No. Name Incompatible with Description
# (1) -DSERVER 2 disables cdb debugger (koth
server
# version)
# (2) -DGRAPHX 1 enables platform specific
core
# graphics
# (3) -DKEYPRESS only for curses display on
SysV:
# enter cdb upon keypress
(use if
# Ctrl-C doesn't work)
# (4) -DEXT94 ICWS'94 + SEQ,SNE,NOP,*,{,}
# (5) -DSMALLMEM 16-bit addresses, less
memory
# (6) -DXWINGRAPHX 1 X-Windows graphics (UNIX)
# (7) -DPERMUTATE enables -P switch
# (8) -DSDLGRAPHX 1 SDL graphics (generic)
#DBG = -g -W -Wall -pg
CFLAGS = -O -DEXT94 -DXWINGRAPHX -L/usr/X11R6/include -DPERMUTATE
LFLAGS = -x
# LIB = -lcurses -ltermlib # enable this one for curses
display
# LIB = -lvgagl -lvga # enable this one for
Linux/SVGA
LIB = -L/usr/X11R6/lib -L/usr/X11R6/include/X11 #
enable this one for X11
# INC = `sdl-config --cflags` # enable this one for SDL
graphics
# LIB = `sdl-config --libs` # enable this one for SDL
graphics
EXESUFFIX=
..SUFFIXES: .o .c .c~ .man .doc .6
MAINFILE = pmars$(EXESUFFIX)
HEADER = global.h config.h asm.h sim.h
OBJ1 = pmars.o asm.o eval.o disasm.o cdb.o sim.o pos.o
OBJ2 = clparse.o global.o token.o
OBJ3 = str_eng.o
all: flags $(MAINFILE)
flags:
@echo Making $(MAINFILE) with compiler flags $(CFLAGS)
$(MAINFILE): $(OBJ1) $(OBJ2) $(OBJ3)
@echo Linking $(MAINFILE)
@$(CC) $(CFLAGS) -o $(MAINFILE) $(OBJ1) $(OBJ2) $(OBJ3) $(LIB)
@strip $(MAINFILE)
@echo done
token.o asm.o disasm.o: asm.h
sim.o cdb.o pos.o disasm.o: sim.h
sim.o: curdisp.c uidisp.c sdldisp.c lnxdisp.c xwindisp.c
xwindisp.c: xwindisp.h pmarsicn.h
lnxdisp.c: lnxdisp.h
$(OBJ1) $(OBJ2) $(OBJ3): Makefile config.h global.h
..c.o:
@echo Compiling $*.o
@$(CC) $(CFLAGS) -c $*.c
clean:
rm -f $(OBJ1) $(OBJ2) $(OBJ3) core
***************MAKE*************************
Making pmars with compiler flags -O -DEXT94 -DXWINGRAPHX
-L/usr/X11R6/include -DPERMUTATE
Compiling pmars.o
Compiling asm.o
Compiling eval.o
Compiling disasm.o
Compiling cdb.o
Compiling sim.o
Compiling pos.o
Compiling clparse.o
Compiling global.o
Compiling token.o
Compiling str_eng.o
Linking pmars
ld: Undefined symbols:
_XAllocClassHint
_XAllocColor
_XAllocSizeHints
_XAllocWMHints
_XChangeWindowAttributes
_XCheckMaskEvent
_XClearWindow
_XCloseDisplay
_XCopyArea
_XCopyColormapAndFree
_XCreateBitmapFromData
_XCreateFontCursor
_XCreateGC
_XCreatePixmap
_XCreateSimpleWindow
_XDefineCursor
_XDisplayName
_XDrawLine
_XDrawPoint
_XDrawRectangle
_XDrawString
_XFillRectangle
_XFreePixmap
_XLoadQueryFont
_XLookupString
_XMapWindow
_XMatchVisualInfo
_XNextEvent
_XOpenDisplay
_XParseColor
_XResizeWindow
_XSelectInput
_XSetBackground
_XSetFont
_XSetForeground
_XSetLineAttributes
_XSetWMProperties
_XSetWindowColormap
_XStringListToTextProperty
_XWarpPointer
_sighandler
make: *** [pmars] Error 1
(01:43 Shodan:ollie)
src/$
help. why cant i compile (i thought it was a problem with having
xfree86 libs (or lack of) but i've installed them now (probably
incorrectly...) but it still refuses to compile.
if you dont know what pmars is, its a corewars simulator. corewars is a
game where you write your own 'warriors' in pseudo assembler and then
pit them in battle for king of the hill. much fun. i was using the
corewars package avaliable via fink (fink install corewars) but that
seems to have issues with some perfectly valid code. and pmars is the
official thing... however, it doesnt want to run (i want X. i did
manage to compile it as a server without issues.)
when i installed the xfree86-shlibs package it bitched at me about not
wanting to install till i removed the old ones. so i just moved them to
another dir (probably not the best idea, frustrated.) but yeah, doesnt
want to compile.
i'm probably just missing a -L/usr/something/somethingelse in the make
file.
anyone??
passes out.
2
answers
Last reply
More about cant compile pmars
-
Archived from groups: rec.games.corewar (More info?)
sorry about the retarded bit at the end, talking about what corewars
is. I was trying to post this to some forums but they were giving me
greif so i posted it here but forgot to edit it. -
Archived from groups: rec.games.corewar (More info?)
fixed
my make file is now :
# generic UNIX makefile
CC = gcc-3.3 # req. for linux
#CC = cc # if you don't have gcc
# Configuration options:
#
# No. Name Incompatible with Description
# (1) -DSERVER 2 disables cdb debugger (koth
server
# version)
# (2) -DGRAPHX 1 enables platform specific
core
# graphics
# (3) -DKEYPRESS only for curses display on
SysV:
# enter cdb upon keypress
(use if
# Ctrl-C doesn't work)
# (4) -DEXT94 ICWS'94 + SEQ,SNE,NOP,*,{,}
# (5) -DSMALLMEM 16-bit addresses, less
memory
# (6) -DXWINGRAPHX 1 X-Windows graphics (UNIX)
# (7) -DPERMUTATE enables -P switch
# (8) -DSDLGRAPHX 1 SDL graphics (generic)
DBG = -g -W -Wall -pg
CFLAGS = -O -Dunix $(DBG) -L/sw/lib -L/usr/X11R6/lib -lgtk -lgdk
-lgmodule -lglib -lintl -lXext -lX11 -lm -I/sw/include -L/usr/X11R6/lib
-DEXT94 -DXWINGRAPHX -DPERMUTATE $(INC) -I/usr/X11RC/include
-L/Developer/SDKs/MacOSX10.4.0.sdk/usr/X11R6/lib/
LFLAGS = -x
# LIB = -lcurses # enable this one for curses display
LIB = -lvgagl -lvga # enable this one for Linux/SVGA
LIB = -L/usr/X11R6/lib -I/usr/X11RC/include
-L/Developer/SDKs/MacOSX10.4.0.sdk/usr/X11R6/lib/ # enable this one
for X11
# INC = `sdl-config --cflags` # enable this one for SDL graphics
# LIB = `sdl-config --libs` # enable this one for SDL graphics
EXESUFFIX=
..SUFFIXES: .o .c .c~ .man .doc .6
MAINFILE = pmars$(EXESUFFIX)
HEADER = global.h config.h asm.h sim.h
OBJ1 = pmars.o asm.o eval.o disasm.o cdb.o sim.o pos.o
OBJ2 = clparse.o global.o token.o
OBJ3 = str_eng.o
all: flags $(MAINFILE)
flags:
@echo Making $(MAINFILE) with compiler flags $(CFLAGS)
$(MAINFILE): $(OBJ1) $(OBJ2) $(OBJ3)
@echo Linking $(MAINFILE)
@$(CC) $(CFLAGS) -o $(MAINFILE) $(OBJ1) $(OBJ2) $(OBJ3) $(LIB)
@strip $(MAINFILE)
@echo done
token.o asm.o disasm.o: asm.h
sim.o cdb.o pos.o disasm.o: sim.h
sim.o: curdisp.c uidisp.c sdldisp.c lnxdisp.c xwindisp.c
xwindisp.c: xwindisp.h pmarsicn.h
lnxdisp.c: lnxdisp.h
$(OBJ1) $(OBJ2) $(OBJ3): Makefile config.h global.h
..c.o:
@echo Compiling $*.o
@$(CC) $(CFLAGS) -c $*.c
clean:
rm -f $(OBJ1) $(OBJ2) $(OBJ3) core
i got some of the cflags i got from fink, plus -Dunix.
thanks to everyone who helped in #corewars
Ask a new question
Read More
Video Games
Related Resources
- Compile slash'EM under mac os x?
- cant install mac os x on intel pc
- 2008 Mac Pro, can't install OS X
- solved Help! Can't boot back into OS X/Windows after Bootcamp/Editing MBR, Partitions are a mess
- solved Can't boot apple OS X from hackintosh
- solved Sabertooth x79 - Can't access BIOS but can boot OS
- solved Can't print with Mac Os X
- solved Can't run Mac OS X Lion on Virtualbox; because of AMD processor
- Compiling Adv770 on OS X?
- solved Can't delete files in Mac OS X Mountain Lion (10.8). Help?
- solved Cant install OS - 0x80070570
- I can't delete items in OS X (external startup drive)
- Can't Install Mac OS X
- Can't install OS X A1181
- my acer laptop can't startup repair, there's not any drive except x drive, and says os not found. how to solve
- Can't access ultra settings (only high), gpu AMD Radeon R9 280x Windows 7 OS
- I cant seem to play my audio CD on my MacBook Pro Mac OS X Version 10.6.8 Help!
- Can't reinstall Os X, freezing recovery mode.
- i can't open imvu its says u can't open imvu with Version Mac os x
- can't install Mac OS X on VMware.