Compile problem

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
soundman
Engineer
Engineer
Posts: 23
Joined: 25 Apr 2004 17:46

Compile problem

Post by soundman »

Svn version 1754
Problem is in station.h line 223 after revision 1721
Compiler is MSVC6

Code: Select all

Linker-Vorgang läuft...
roadveh_cmd.obj : error LNK2001: Nichtaufgeloestes externes Symbol _GetRoadStopType
ReleasePNG/ttd.exe : fatal error LNK1120: 1 unaufgeloeste externe Verweise
Fehler beim Ausführen von link.exe.
soundman
Engineer
Engineer
Posts: 23
Joined: 25 Apr 2004 17:46

Post by soundman »

small bump.
Problem still exists in today's svn
User avatar
Celestar
Director
Director
Posts: 574
Joined: 02 Jul 2004 10:56
Contact:

Post by Celestar »

Yeah I've heard about it. I have NO idea why that crappy linker doesn't get the process done and I have no way to test it, as I have neither any Windows Installation nor an MSVC compiler. But I'll see what can be done. I know it works in .NET, only that I'll never use that :)

Celestar
MikeG
Engineer
Engineer
Posts: 8
Joined: 26 Jan 2005 12:49

Post by MikeG »

inline defined functions should only exists in headers, so please use this diff to compile your version.
Attachments
win32.diff
(1007 Bytes) Downloaded 310 times
soundman
Engineer
Engineer
Posts: 23
Joined: 25 Apr 2004 17:46

Post by soundman »

Openttd compiles correct with this patch, but it crashes at first launch. (Before the menu screen)
But thanks for the patch. It's one step in the right direction.

Crash log is attached.
Attachments
crash.log.txt
Crash log
(5.85 KiB) Downloaded 368 times
soundman
Engineer
Engineer
Posts: 23
Joined: 25 Apr 2004 17:46

Debug info

Post by soundman »

Some debug info:
Attachments
Debug level 9 (-d 9)
Debug level 9 (-d 9)
debug-level-9.png (31.48 KiB) Viewed 1491 times
Debug level 8 (-d 8)
Debug level 8 (-d 8)
debug-level-8.png (33.15 KiB) Viewed 1497 times
User avatar
bociusz
Traffic Manager
Traffic Manager
Posts: 131
Joined: 24 Jul 2004 11:04
Location: Hungary
Contact:

Post by bociusz »

compile in "Release with PNG" mode with the /Ob0 flag
User avatar
bociusz
Traffic Manager
Traffic Manager
Posts: 131
Joined: 24 Jul 2004 11:04
Location: Hungary
Contact:

Post by bociusz »

Celestar fixed it in r1872
soundman
Engineer
Engineer
Posts: 23
Joined: 25 Apr 2004 17:46

Post by soundman »

r1872 compiles as fine as before with your patch.
But stil the same crash.
User avatar
orudge
Administrator
Administrator
Posts: 25226
Joined: 26 Jan 2001 20:18
Skype: orudge
Location: Banchory, UK
Contact:

Post by orudge »

I had this crash too, ever since big maps was committed to SVN. I could run the Debug build though, so I'm not too sure why it doesn't work... I haven't looked into it in that much detail yet.
soundman
Engineer
Engineer
Posts: 23
Joined: 25 Apr 2004 17:46

Post by soundman »

orudge wrote:I had this crash too, ever since big maps was committed to SVN. I could run the Debug build though, so I'm not too sure why it doesn't work... I haven't looked into it in that much detail yet.
Yeah, a Debug build seems to work.
However it seems to be a bit slow.
User avatar
bociusz
Traffic Manager
Traffic Manager
Posts: 131
Joined: 24 Jul 2004 11:04
Location: Hungary
Contact:

Post by bociusz »

soundman wrote:
orudge wrote:I had this crash too, ever since big maps was committed to SVN. I could run the Debug build though, so I'm not too sure why it doesn't work... I haven't looked into it in that much detail yet.
Yeah, a Debug build seems to work.
However it seems to be a bit slow.
You can compile in Release mode but you'll still need the /Ob0 flag
soundman
Engineer
Engineer
Posts: 23
Joined: 25 Apr 2004 17:46

Post by soundman »

bociusz wrote: You can compile in Release mode but you'll still need the /Ob0 flag
I've manualy added it to ttd.dsp line 127 and 129, but openttd still crashes. When I try to add it in msv6, it disappears when I leave the the field.
User avatar
bociusz
Traffic Manager
Traffic Manager
Posts: 131
Joined: 24 Jul 2004 11:04
Location: Hungary
Contact:

Post by bociusz »

soundman wrote:
bociusz wrote: You can compile in Release mode but you'll still need the /Ob0 flag
I've manualy added it to ttd.dsp line 127 and 129, but openttd still crashes. When I try to add it in msv6, it disappears when I leave the the field.
Only add to line 129 with notepad or anything else (I put it between /Oa and /Ow). It affects only the release by png builds.
soundman
Engineer
Engineer
Posts: 23
Joined: 25 Apr 2004 17:46

Post by soundman »

bociusz wrote:Only add to line 129 with notepad or anything else (I put it between /Oa and /Ow). It affects only the release by png builds.
Yeah, this works. Patch attached.
Attachments
ttd.dsp.patch.txt
Compile fix (workaround?) for msvc6
(1 KiB) Downloaded 332 times
User avatar
bociusz
Traffic Manager
Traffic Manager
Posts: 131
Joined: 24 Jul 2004 11:04
Location: Hungary
Contact:

Post by bociusz »

soundman wrote:
bociusz wrote:Only add to line 129 with notepad or anything else (I put it between /Oa and /Ow). It affects only the release by png builds.
Yeah, this works. Patch attached.
Sorry, but it will be never added to SVN. Ask Darkvater why.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 7 guests