The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: Aglezabad on November 24, 2009, 08:29:08 pm

Title: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
Post by: Aglezabad on November 24, 2009, 08:29:08 pm
Hello:

I have tried to compile the code following the instructions, but it does not generate the feasible one. It appears 62 errors and approximately 1000 warnings, but it does not create the programme. My system is Windows 7 x64 and I use Visual C ++ 2008.
I have put bzip files.

Regards and thanks.

Here is log file:
7z file (http://www.mediafire.com/?zgdlygjmeii)
htm file (http://www.mediafire.com/?eynzjomyoel)
Title: Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
Post by: wernieman on November 24, 2009, 08:47:56 pm
Do you realy put the bzip files??

Quote
fatal error C1083: No se puede abrir el archivo incluir: 'bzlib.h'
Title: Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
Post by: Aglezabad on November 24, 2009, 08:53:04 pm
I put bzlib.h in OTTD folder/shared/include and I configure Visual c++ to read this folder. ??? Where i put these files?
Title: Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
Post by: VS on November 24, 2009, 09:19:09 pm
That sounds good. I can imagine only one problem: did you add that folder for "include files" ?
Title: Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
Post by: Aglezabad on November 24, 2009, 09:34:22 pm
Well, with it I have managed to arrange all failures less 1. I continue having 1 mistake, but at least already it is not the bzlib.h.

I p**** to you again the log.
1 error,1400 warnings  :-[

link (http://www.mediafire.com/?vu2njz0o5dl)


Title: Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
Post by: wernieman on November 24, 2009, 09:44:12 pm
The warning are "normal"

You have a linking problem, he don´t found a libary

See
Quote
LINK : fatal error LNK1181: no se puede abrir el archivo de entrada 'zlibstat.lib'

But i don´t know how to configure Visual C ++ 2008 ...

but ... could you look if you have the libary (file) on your System?

And .. it is a part of the zlib ;o)
Title: Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
Post by: VS on November 24, 2009, 09:54:02 pm
You must...
1) unpack the file libbz2.lib, copy into ottd/win32/library
2) add that path in same window as I showed, but the picker (I made red mark) must be set to "library files" (this is the problem Werner found)
3) menu project -> simutrans properties; configuration properties -> Linker -> Input; then edit the first line where it say many times something.lib and add to this list libbz2.lib
Title: Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
Post by: prissi on November 24, 2009, 09:58:00 pm
very often there is not zlibstat.lib but only zlib.lib. You can use this too, but then need also the zlin.dll, which needs to be in the program folder of simutrans then.
Title: Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
Post by: Aglezabad on November 24, 2009, 10:05:01 pm
I had zlibstat.lib in OTTD lib folder, but the programme can't read the file. I try change the name in properties and change the filename but i have the same result. Where i download zlibstat.lib?

EDIT:Finally already I have managed to compile the code. The problem was that ithad placed the libraries in the inadequate folder, because of it, it was not working.

Thank you for fixing the problem up.
Regards.