[Freeciv-Dev] Re: What compiler to use to compile FreeCiv source?
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Mon, Jan 27, 2003 at 11:39:21AM +0000, Pasi Kettunen wrote:
> Hi,
>
> I mailed you a couple of weeks ago about problems compiling the FreeCiv
> source with GCC under Windows. I am now using LCC-Win32, which seems
> to work fine. My problem is, however, that I don't really know how to link
> and compile the whole thing. First of all, what files/directories do I
> need to compile, if I just want to make a Windows executable? I presume I
> need at least the folders 'common', 'client', 'server' and 'ai'? How
> do I include all those files for the compiling? Should they all come out
> as a single executable? I don't know much about compiling C programs as
> such, I am only interested in AI techniques, and will develop a fresh AI
> for FreeCiv with a university lecturer, my intention being be to
> design it as logical and easy to read as possible. I do not intend to
> distribute it, so I'm not worried about any of the CVS -stuff.
> My questions
> are probably stupid, but I would appreciate if
> you could explain the whole compilation process to me like a six-year old.
> :-) I'm kind of stuck at the moment, since I can't start coding the AI if
> I can't even compile the existing source code.
I have no idea what knowledge you have. It looks like you don't know
what makefiles and configure is. These two are freeciv independent.
The generated makefiles will create archives (of .o files) for each
directory. For example will common/libcivcommon.a will contain all
files common/*.o. Later all these archives are linked together with
the main file (the one which has the main function) like so:
gcc -g -O2 -Wall -o civserver civserver.o ../common/libcivcommon.a
../ai/libcivai.a ./libcivserver.a ../common/libcivcommon.a
../ai/libcivai.a ./libcivserver.a -lreadline -lncurses -lm -lz
The step with the archives isn't strictly necessary. You can just link
all *.o files and get the same result:
gcc -g -o civserver ../common/*.o ../ai/*.o *.o ../common/aicore/*.o
-lreadline -lncurses -lm -lz
Have you read http://www.freeciv.org/windows/ and the general
http://www.freeciv.org/startguide.html? Till which point did you get?
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Windows is the one true OS. MS invented the GUI. MS invented
the 32 bit OS. MS is open and standard. MS loves you. We have
always been at war with Oceana."
|
|