Development tool used ?

OpenTTD is a fully open-sourced reimplementation of TTD, written in C++, boasting improved gameplay and many new features.

Moderator: OpenTTD Developers

A.C.
Engineer
Engineer
Posts: 2
Joined: 18 Jan 2003 07:55
Location: Taiwan

Post by A.C. »

I use cygwin environment.
Just open a bash shell, cd into source directory,
and type make, compiling and running are no problems.
TBone
Engineer
Engineer
Posts: 15
Joined: 05 May 2004 20:26

Post by TBone »

I think that it's not a system misconfiguration but a source broken because I compile few sources and it's OK.

The week-end comes, I can take my time to (re-)try ;)
Caliban
Engineer
Engineer
Posts: 1
Joined: 20 May 2004 00:25

Compile problem

Post by Caliban »

I'm running into this vehicle limit of somewhere around 57 trains that seems to exist, and I read in the forums that it's easy to change in the source.

Only problem is that I'm a complete C/C++ illiterate but I'm not affraid to jump into the deep, so I'm probably asking stupid questions, and missing obvious clues, but please bare with me. I'm trying to get this all done on Windows XP Pro.

Here is what I did:

Downloaded "TortoiseSVN-1.0.4-UNICODE_svn-1.0.2.msi"
Installed to default localtion
Restart computer (you gotta love windows)
No Problem

Downloaded "VCToolkitSetup.exe" from http://msdn.microsoft.com/visualc/vctoolkit2003
Installed to "C:\VCT2003"
Add "C:\VCT2003\bin" to PATH
No Problem

Create a folder "C:\VCT2003\source\openttd"
Checkout svn://svn.openttd.com/openttd/trunk into it
No Problem

Now, the problems begin...

Downloaded openttd-useful.zip
Unpacked zip file to "C:\VCT2003\lib"
Sounds like a logical place to me as there is no doc whatsoever with it.
Don't know if this is a problem

Downloaded "make.exe from http://digitalmars.com
Copied make.exe to "C:\VCT2003\bin"
Assuming it doesn't matter where it is, and this is related, and in the path
Don't know if this is a problem

In these forums someone said to "... set the $CPP in makefile to cl.exe ..."
Uhmm.. there is no $CPP in my (openttd's) makefile
This might be a problem as make needs to know what compiler/linker to call I assume. But how do I tell him that?
In the end I did change "CC=gcc" to "CC=cl.exe" but that didn't change a thing.

Changed to "C:\VCT2003\source\openttd"
Now, if I understand the Makefile docs correctly, I need the following command:
run "make WITH_ZLIB=1 WITH_PNG=1 WIN32=1 MANUAL_CONFIG=1"

We're presented with a very descriptive and elaborate error message:
"Error on line 72: expecting target : dependencies"
Can anyone translate that english please?
Line 72 of what file? of Makefile? what's wrong with "ifndef MANUAL_CONFIG" on line 72?
Line 72 is also the very first non-empty, non-comment line of Makefile....
This IS a problem

Trying to aim a bit lower, I tried to get strgen compiled first

Changed to "C:\VCT2003\source\openttd\strgen"
"cl strgen.c"
c:\VCT2003\source\openttd\strgen\../stdafx.h(80) : fatal error C1189: #error :
No endianness defined, use either TTD_LITTLE_ENDIAN or TTD_BIG_ENDIAN
*sigh*

"cl strgen.c -DTTD_LITTLE_ENDIAN"
strgen.c(8) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
Which is correct, it doesn't exist.

Ok, dead end. And that is where my journy ends.

Can anyone explain why things don't work the way they should according to information I can find in the forums?

Or can anyone tell me step by step what I need to do (either from scratch or from here) to get this thing compiled?

Or maybe it's just easier to post an updated binary somewhere, since the developers don't seem to be release this update anytime soon, and 57 trains is not a lot...

Thanks in advance!

P.S. I also looked at MinGW, but they seem to like to things the hard way, and I have no clue which of the 600 files I need to download/install.
School
Engineer
Engineer
Posts: 56
Joined: 18 Apr 2004 09:30

Post by School »

I think you need to have Cygwin as the tools there is much userfriendly (to me) and you would get a better result.
Also cygwin supports path environment variable so the things still work.
School
Engineer
Engineer
Posts: 56
Joined: 18 Apr 2004 09:30

Post by School »

I just find that the makefile there is already outdated because rev.c is deleted from the main tree.
The makefile is still finding that thing....
User avatar
Darkvater
Tycoon
Tycoon
Posts: 3053
Joined: 24 Feb 2003 18:45
Location: Hong Kong

Post by Darkvater »

School wrote:I just find that the makefile there is already outdated because rev.c is deleted from the main tree.
The makefile is still finding that thing....
rev.c is supposed to be made dynamically during compilation. Later it is used for compilation. So the Makefile should look for rev.c :)

Rev.c is only not in svn anymore (because it is dynamic)
TrueLight: "Did you bother to read any of the replies, or you just pressed 'Reply' and started typing?"
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
School
Engineer
Engineer
Posts: 56
Joined: 18 Apr 2004 09:30

Post by School »

It's crap. I don't find a link in the ttd.dsp project file...
And, it just fail to run the makefile since I am using windows with msys.
Of cource it is optional.
User avatar
Saskia
Director
Director
Posts: 523
Joined: 22 Feb 2004 14:23
Location: Cologne, Germany
Contact:

Re: Compile problem

Post by Saskia »

Caliban wrote:...
Downloaded openttd-useful.zip
Unpacked zip file to "C:\VCT2003\lib"
Sounds like a logical place to me as there is no doc whatsoever with it.
Don't know if this is a problem
...
/lib is for system libraries, but openttd-useful contains game stuff :wink:
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

School wrote:It's crap. I don't find a link in the ttd.dsp project file...
And, it just fail to run the makefile since I am using windows with msys.
Of cource it is optional.
ttd.dsp is in the root of the svn folder
School
Engineer
Engineer
Posts: 56
Joined: 18 Apr 2004 09:30

Post by School »

Bjarni wrote:
School wrote:It's crap. I don't find a link in the ttd.dsp project file...
And, it just fail to run the makefile since I am using windows with msys.
Of cource it is optional.
ttd.dsp is in the root of the svn folder
No.
I mean I couldn't find a link to "rev.c" in ttd.dsp but in "Makefile", thus there is a part of script that generate rev.c in "Makefile" but ttd.dsp doesn't.
Post Reply

Return to “General OpenTTD”

Who is online

Users browsing this forum: Baidu [Spider] and 4 guests