The International Simutrans Forum

 

Author Topic: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)  (Read 5280 times)

0 Members and 1 Guest are viewing this topic.

Offline Aglezabad

  • *
  • Posts: 270
  • Recordad que sin pasar por aquí, os veo.
    • Interusers
  • Languages: ES
I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
« 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
htm file

Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
« Reply #1 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'

Offline Aglezabad

  • *
  • Posts: 270
  • Recordad que sin pasar por aquí, os veo.
    • Interusers
  • Languages: ES
Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
« Reply #2 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?

Offline VS

  • Senior Plumber (Devotee)
  • Devotees (Inactive)
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
« Reply #3 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" ?

Offline Aglezabad

  • *
  • Posts: 270
  • Recordad que sin pasar por aquí, os veo.
    • Interusers
  • Languages: ES
Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
« Reply #4 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 pass to you again the log.
1 error,1400 warnings  :-[

link



Offline wernieman

  • Devotees (Inactive)
  • *
  • Posts: 713
    • Werniemans-Webside (only German)
Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
« Reply #5 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)

Offline VS

  • Senior Plumber (Devotee)
  • Devotees (Inactive)
  • *
  • Posts: 4856
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
« Reply #6 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

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10622
  • Languages: De,EN,JP
Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
« Reply #7 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.

Offline Aglezabad

  • *
  • Posts: 270
  • Recordad que sin pasar por aquí, os veo.
    • Interusers
  • Languages: ES
Re: I can't compile Simutrans code (Win7 x64 Visual C++ 2008)
« Reply #8 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.
« Last Edit: November 25, 2009, 04:28:22 PM by Aglezabad »