Development tool used ?
Moderator: OpenTTD Developers
Compile problem
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.
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.
rev.c is supposed to be made dynamically during compilation. Later it is used for compilation. So the Makefile should look for rev.cSchool 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 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."
<@[R-Dk]FoRbiDDeN> "HELP, this litte arrow thing keeps following my mouse, and I can't make it go away."
Re: Compile problem
/lib is for system libraries, but openttd-useful contains game stuffCaliban 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
...

No.Bjarni wrote:ttd.dsp is in the root of the svn folderSchool 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.
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.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 14 guests