Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2003:
[Freeciv-Dev] Re: What compiler to use to compile FreeCiv source?
Home

[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]
To: Pasi Kettunen <psk1@xxxxxxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: What compiler to use to compile FreeCiv source?
From: Raimar Falke <rf13@xxxxxxxxxxxxxxxxx>
Date: Sat, 1 Feb 2003 17:52:54 +0100

On Sat, Feb 01, 2003 at 03:17:59PM +0000, Pasi Kettunen wrote:
> 
> Hi Raimar,
> 
> I'm sorry to be such a pest, but I still haven't been able to compile the
> FreeCiv source.
> 
> 
> > 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.
> 
> Yes, you are right. I really don't know much about compiling C programs, I
> have only compiled single file prorams before. I have been reading on the
> matter, but haven't found anything that would help me with this particular
> problem. I read all the FAQs about FreeCiv and C that I could think of.
> 
> > The generated makefiles will create archives (of .o files) for each
> > directory.
> 
> Can you explain about the makefiles. What am I supposed to do with them?
> Do I need to "feed" them to GCC somehow?

Since these are freeciv independent there are other sources:

http://farside.ph.utexas.edu/teaching/329/lectures/node35.html
http://oucsace.cs.ohiou.edu/~bhumphre/makefile.html
http://www.cs.utah.edu/dept/old/texinfo/configure/configure.html#SEC1

However note that while the freeciv build-system is based on makefiles
it is a lot more complex that the examples mentioned above. It shares
the same simple rules mentioned above but is larger.

> > 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
> 
> Ok, so the second example you give will combine the object files into an
> executable. But I was never able to create those object files. How do I do
> that?

Running "make".

> What is that aicore -folder you used in your example? I didn't use that
> since it doesn't exist with the FreeCiv source directory structure.

That you don't use an up-to-date CVS version.

> Anyway, I tried your examples and I got errors once again.  First of
> all, in Linux I get errors saying "No such file or directory" for
> all the specified files, although I'm sure I spelled everything
> correctly.

Please tell us exactly what you are typing and what outputs these
commands write. It is the easiest way.

> In Windows I think I had a problem with GCC itself, since the plain
> executable ran fine by itself, but wouldn't compile anything, just
> saying that the program cannot be executed. Ok, if I forget about
> Windows altogether, shouldn't that stuff work in Linux as well?

Yes it should work out-of-the-box with linux.

So what you please do is that untar your source, "cd" do the dir and
than type "./configure && make" and post all output. We will see what
problems you have this way.

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "This is Linux Country. On a quiet night, you can hear Windows reboot."



[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] Re: What compiler to use to compile FreeCiv source?, Raimar Falke <=