The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: T0m4S on October 24, 2011, 04:31:11 PM

Title: [SOLVED] Simutrans not compiling in windows
Post by: T0m4S on October 24, 2011, 04:31:11 PM
Hi!

Since serveral days I have a problem and can't compile the simutrans source code from the svn server in windows. With linux I have no problems. I'm have Windows 7 64 bits and use MSVC 2010. The log error says:

1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
1>roadsign.obj : error LNK2001: unresolved external symbol "public: __thiscall privatesign_info_t::privatesign_info_t(class roadsign_t *)" (??0privatesign_info_t@@QAE@PAVroadsign_t@@@Z)
1>simwerkz.obj : error LNK2001: unresolved external symbol "public: void __thiscall privatesign_info_t::update_data(void)" (?update_data@privatesign_info_t@@QAEXXZ)
1>C:\simutrans_svn\simutrans\trunk\Debug\Simutrans.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


As I have seen no other reports and before it was working I suppose I have done something without knowing it that causes this problem.

Does anybody knows why I have this problem? If you need more info please ask for it.

Thanks!
Title: Re: Simutrans not compiling in windows
Post by: Dwachs on October 24, 2011, 05:57:20 PM
you have to add the files gui/private-sign.h and .cpp (or whatever their name is) to the project.
Title: Re: Simutrans not compiling in windows
Post by: prissi on October 24, 2011, 07:05:15 PM
svn update should take care of that too.
Title: Re: Simutrans not compiling in windows
Post by: T0m4S on October 25, 2011, 07:38:16 AM
Thanks to both of you. I didn't realice I wasn't using the most updated project file as it's converted automatically to the newest version of MSVC and I didn't realice I was using the old version.
Title: Re: [SOLVED] Simutrans not compiling in windows
Post by: VS on October 25, 2011, 07:55:51 AM
Usually looking at svn log will help with new files faster :) You have to know what the problem is, though...
Title: Re: [SOLVED] Simutrans not compiling in windows
Post by: T0m4S on October 25, 2011, 08:00:56 AM
Usually I do that. The problem it's that this summer and until not long time ago I had no internet. So when I did a svn update there were a lot of changes and I didn't look at the logs... Next time even if I have to spend some time I'll do it :) Anyway it wasn't really important as in linux it was working well :D
Title: Re: [SOLVED] Simutrans not compiling in windows
Post by: prissi on October 25, 2011, 08:13:55 AM
My MSVC updates its project file when something is changed. True, I have a ton of update reports, but the project always compiles. Did you copy your file to a different location?
Title: Re: [SOLVED] Simutrans not compiling in windows
Post by: T0m4S on October 25, 2011, 08:52:28 AM
No, it's on the default location. The problem it's that I used the "converted" version not the one that it's update on svn...   :-[
Title: Re: [SOLVED] Simutrans not compiling in windows
Post by: Dwachs on October 25, 2011, 10:59:24 AM
Could it be that MSVS 2010 uses vcprojx files, while the svn repository only contains vcproj files?
Title: Re: [SOLVED] Simutrans not compiling in windows
Post by: VS on October 25, 2011, 11:15:14 AM
Well, yes and no. This is the difference as of now, but before the files had same names and situation wasn't really different. AFAICT incompatibility between MSVC versions means that you always end up either with different files (import & save as), or permanently modified files in wc (which won't sync).

Myself, I just set up my own project file based on what is in svn, and then add/remove files from the project when needed. It isn't ideal, but works well enough.

edit: To clarify a bit... there are numerous reasons why this is the path of least resistance. Old files were binary, new are xml, extension changed, and it's easy to set up compiler paths for project but not for the whole thing. That doesn't go well with using the versioned files.
Title: Re: [SOLVED] Simutrans not compiling in windows
Post by: Dwachs on October 25, 2011, 01:00:58 PM
Could this be solved by maintaining a list of project files for different versions of MSVS?
Title: Re: [SOLVED] Simutrans not compiling in windows
Post by: DirrrtyDirk on October 25, 2011, 01:47:35 PM
A problem might be, that in MSVC 2010, you don't set the "include" an "library" paths in the program options as in earlier versions, but they are set individually for each project - and stored there as well. Right now MSVC has to convert the "old" project file to 2010 version and there you have to manually set the paths again - each time the project file is updated on SVN. (or least that's how I had to do it in order to make things work). And providing a MSVC 2010 project would the have a wrong path (or at best an empty one) included.
Title: Re: [SOLVED] Simutrans not compiling in windows
Post by: Dwachs on October 25, 2011, 04:06:08 PM
The vcproj file also stores paths on per project basis.
Quote from: DirrrtyDirk on October 25, 2011, 01:47:35 PMAnd providing a MSVC 2010 project would the have a wrong path (or at best an empty one) included.
If there would be a MSVC 2010 project in the svn repo, then you would have to set the paths only once: after checkout. During updates, the paths would not be changed.
Title: Re: [SOLVED] Simutrans not compiling in windows
Post by: T0m4S on October 25, 2011, 05:38:04 PM
Quote from: Dwachs on October 25, 2011, 04:06:08 PM
If there would be a MSVC 2010 project in the svn repo, then you would have to set the paths only once: after checkout. During updates, the paths would not be changed.
I think that should be an ideal solution. If I remeber correctly there was once something like that with a folder where was kept a MSVC 2008 project version.
Title: Re: [SOLVED] Simutrans not compiling in windows
Post by: DirrrtyDirk on October 25, 2011, 09:38:46 PM
Quote from: Dwachs on October 25, 2011, 04:06:08 PM
The vcproj file also stores paths on per project basis.If there would be a MSVC 2010 project in the svn repo, then you would have to set the paths only once: after checkout. During updates, the paths would not be changed.

Oh, well it's worth a try then.  :)
Title: Re: [SOLVED] Simutrans not compiling in windows
Post by: Dwachs on October 26, 2011, 07:16:35 AM
Could you upload such a project file?