Click to See Complete Forum and Search --> : Compile Request
pix31
02-01-2006, 05:40 PM
Hey guys,
I have very little knowledge about compiling/programming etc, the only real knowledge is what I learned many moons ago on Visual Basic 4 :cool:
I have a request for somebody withsome spare time, I don't think it will take much effort but I truely don't know anything. What I have is source code for a script made for windows, the script itself is for compiling maps made for the game half-life 2.
I would be forever grateful if somebody could compile the source code for red hat 9. I've tried to see if I can do anything but it is all waaay over my head.
If this is done I'll do what I can to return to favour.
Thanks,
Brian
truls
02-02-2006, 09:48 AM
If you could put the source code on a web-server or give a link to somewhere we could download it and see what it is like, that would help a lot in answering this.
pix31
02-02-2006, 05:35 PM
Oh sure, heres the link to the source code.
http://www.edgefiles.com/files/21133.html
There are a couple of tools that can be compiled in thatpackage, I only need 4 (hlbsp, hlrad, hlcsg, and hlvis) and I'm assuming once you figure out how to do one the other 3 become pretty easy.
Thank you for taking to the time to look at this.
bwkaz
02-02-2006, 07:48 PM
That's going to require a whole lot of hacking to get it to work with a non-MS compiler. I tried to compile just one .cpp file inside the hlbsp directory, just to see how much of a pain it was, and the first time, it came back with a bunch of errors about missing headers. So I added ../common to the header search path, and it came back with a crapload of undefined symbols -- presumably these are symbols that MS's compiler or MS's headers define, or something.
It would probably take me several hours (at least; probably over the course of a week) of hacking it to get it to completely work.
(This is what happens when people write code for Windows...)
truls
02-05-2006, 07:08 PM
Seems like this was a program that was once written to be portable, and has then been windowized. I did some hacking and got hlvis to compile (I'll tell you how to get the others going later).
First, since basictypes.h does not exist you need to create it. Create it in the common directory with the following content:
#ifndef H_BASICTYPES_H
#define H_BASICTYPES_H
typedef unsigned int UINT32;
#endif
Then in the main directory (zhlt_source) create a file called Makefile with the following content:
CPPFLAGS = -I common -D SYSTEM_POSIX -D STDC_HEADERS -D HAVE_FCNTL_H -D HAVE_UNISTD_H\
-D HAVE_SYS_STAT_H -D HAVE_PTHREAD_H
VPATH = common hlbsp hlrad hlcsg hlvis /usr/include/malloc
hlvis.exe: flow.o vis.o zones.o blockmem.o bspfile.o cmdlib.o filelib.o log.o mathlib.o\
messages.o scriplib.o threads.o winding.o
g++ $^ -o $@ -lpthread
You might need to change the location of malloc.h (I'm using a Mac, and on my machine it is in /usr/include/malloc. Just use 'locate malloc.h' to find it).
Finally, you need to fix some source files. I have no idea why it compiles on a windows machine, but you need to add '#include "mathlib.h"' to common/cmdlib.cpp.
You should now be able to compile hlvis by issuing the command 'make hlvis.exe', it worked on my machine at least.
To compile the other programs you need to make entries for each one listing the source files used for the programs. In each directory there is a make.inc file. Just add all the files listed in the INPUT entry.
Hope this works, and if you have any problems don't hesitate to ask.