Problems with Compiling

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
ChefKoch
Engineer
Engineer
Posts: 8
Joined: 27 Jul 2008 15:02

Problems with Compiling

Post by ChefKoch »

I have some Files that cant be found when Im building ottd.. I attached the Logfile.

Anyone got an idea how to fix this? I followed the manual on the wiki.

Help is much appreciated
regards
ChefKoch
Attachments
BuildLog.txt
change the ending to "htm" to view properly, I wasnt allowed to attach htm
(60.03 KiB) Downloaded 265 times
Last edited by ChefKoch on 27 Jul 2008 19:45, edited 2 times in total.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Problems with Compiling

Post by DaleStan »

ChefKoch wrote:I attached the Logfile.
Unfortunately, it seems that didn't work. Can you try again, please?
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
ChefKoch
Engineer
Engineer
Posts: 8
Joined: 27 Jul 2008 15:02

Re: Problems with Compiling

Post by ChefKoch »

Thanx A LOT for your quick reply already, file should work now just change the ending to htm to view it properly
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 622
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Re: Problems with Compiling

Post by glx »

Ok, it seems you are using MSVC8, but you don't have the platform SDK.
Follow instructions on http://wiki.openttd.org/index.php/Micro ... s_Editions and it should compile fine.
ChefKoch
Engineer
Engineer
Posts: 8
Joined: 27 Jul 2008 15:02

Re: Problems with Compiling

Post by ChefKoch »

I followed that guide 1:1, the only thing I could not do was:

Only a few changes are required to use the Platform SDK with Visual C++ 2005 Express. Please follow steps 3, 4 and maybe 5 of the guide from Microsoft

because the Link is dead..

Does anyone know what thouse steps were?

Edit: nm, now the link works.
Mchl
Director
Director
Posts: 611
Joined: 05 Jan 2007 15:50
Location: Poland
Contact:

Re: Problems with Compiling

Post by Mchl »

Perhaps try MSVC 2008. At least it worked for me, when I followed its wiki guide :)
dbfriends
Engineer
Engineer
Posts: 4
Joined: 02 Feb 2002 13:03

Re: Problems with Compiling

Post by dbfriends »

Hi,

I'm also having compiling-related problems... I'm on a Mac, tho. I downloaded the source and added a patch pack to it, then compiled. It runs fine as a bundle on my system, but when I try to copy that version to a friend's computer I have no luck at all.

I think it's because the compiler isn't adding some libraries or something (my compiled version is 6MB smaller than the original, downloaded one)... does anyone know how to force make to include these?
ChefKoch
Engineer
Engineer
Posts: 8
Joined: 27 Jul 2008 15:02

Re: Problems with Compiling

Post by ChefKoch »

Ok I managed to compile it, I set the Paths, but didnt notice that it was saved to every solution seperate so I didnt have them for the new version I loaded.

Now comes maybe a totally retarded Question for you, but I managed to Build it but I cant run it. How do I go from Building to runing it? I found the ottd.exe but It wont run cus the necessary files arent there..

Thank you for your assistance.
Mchl
Director
Director
Posts: 611
Joined: 05 Jan 2007 15:50
Location: Poland
Contact:

Re: Problems with Compiling

Post by Mchl »

Necessary files such as? If you mean original grf files, it's enough if you have them in 'My Documents' > 'OpenTTD' > 'data' folder.
ChefKoch
Engineer
Engineer
Posts: 8
Joined: 27 Jul 2008 15:02

Re: Problems with Compiling

Post by ChefKoch »

when I put the GRF files there it tells me invalid language, wrong version?

See I dont get how I get from Building to playing.. shouldnt the files be put somewhere or how is this step done?
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 622
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Re: Problems with Compiling

Post by glx »

You need to copy openttd.exe from objs\win32\release to bin if you don't run it from MSVC.
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Problems with Compiling

Post by Alberth »

I don't have any experience with a Mac, but let's have a try anyway:
dbfriends wrote:I'm also having compiling-related problems... I'm on a Mac, tho. I downloaded the source and added a patch pack to it, then compiled. It runs fine as a bundle on my system, but when I try to copy that version to a friend's computer I have no luck at all.
What do you mean 'no luck at all'?
The copy failed?, you couldn't start the binary?, OpenTTD exe complained about something?, Single player works, but multi-player doesn't?

Please state what doesn't work more precisely, if possible with the precise error reported by the system.

dbfriends wrote:I think it's because the compiler isn't adding some libraries or something (my compiled version is 6MB smaller than the original, downloaded one)... does anyone know how to force make to include these?
Depends on the compiler you use. One thing you may want to check is whether the set of installed libraries matches with each other, in particular those libraries that the OpenTTD Wiki/readme states as needed.

It may be the case that your compiler uses dynamic linking, where libraries are not added into the binary, but are loaded into memory when you start the program. That would be one possible explanation for the difference in size. Obviously, for this to work at a system, those libraries (with the precise version) need to be there when you run the program.

Albert
dbfriends
Engineer
Engineer
Posts: 4
Joined: 02 Feb 2002 13:03

Re: Problems with Compiling

Post by dbfriends »

Alberth wrote:What do you mean 'no luck at all'?
The copy failed?, you couldn't start the binary?, OpenTTD exe complained about something?, Single player works, but multi-player doesn't?
Copying it works fine - the binary is the same filesize and everything as on my machine. It's at the running-it stage that things fall over. OpenTTD tries to load and then just vanishes again. No error messages, nothing. It just doesn't appear!
Alberth wrote:Depends on the compiler you use. One thing you may want to check is whether the set of installed libraries matches with each other, in particular those libraries that the OpenTTD Wiki/readme states as needed.

It may be the case that your compiler uses dynamic linking, where libraries are not added into the binary, but are loaded into memory when you start the program. That would be one possible explanation for the difference in size. Obviously, for this to work at a system, those libraries (with the precise version) need to be there when you run the program.
This sounds like it might be the problem, I'll check it. I think my compiler would be GCC, does that make sense?!
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: Problems with Compiling

Post by Alberth »

dbfriends wrote:Copying it works fine - the binary is the same filesize and everything as on my machine. It's at the running-it stage that things fall over. OpenTTD tries to load and then just vanishes again. No error messages, nothing. It just doesn't appear!
If you don't even get a window for a few milliseconds, then yes, it might be a library loading problem.

I would expect (even in the above case) the system to complain about what is missing. However that will most likely be a textual error message that you only get when you start the program from a terminal window (and entering './openttd' in the 'bin' directory).
Unfortunately, it is quite difficult to test what happens at a working system, so I cannot easily try it here.
dbfriends wrote:This sounds like it might be the problem, I'll check it. I think my compiler would be GCC, does that make sense?!
Yes :)

You can query which libraries it uses with 'ldd'. Type 'ldd openttd' while you are in the 'bin' directory from the terminal window, and you get a list of libraries that it loads. Addresses of loading may change, but the libraries and their versions should match.

If possible, you could also try building openttd from the sources at the other machine.
dbfriends
Engineer
Engineer
Posts: 4
Joined: 02 Feb 2002 13:03

Re: Problems with Compiling

Post by dbfriends »

Alberth wrote:You can query which libraries it uses with 'ldd'. Type 'ldd openttd' while you are in the 'bin' directory from the terminal window, and you get a list of libraries that it loads. Addresses of loading may change, but the libraries and their versions should match.

If possible, you could also try building openttd from the sources at the other machine.
Cool! The Mac command differs a little bit but otool openttd -L does the same thing, apparently. Just for future reference :) I now have a list of libraries, I'll test it on my pal's machine ASAP.

I didn't really want to have to compile it on his, too, because the devtools download for Mac OS is a gigabyte :)
Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 30 guests