OpenTTD

Tasklist

FS#1925 - Compiling with MinGW - Linker Error

Attached to Project: OpenTTD
Opened by Desolator (Desolator) - Sunday, 13 April 2008, 21:17 GMT
Type Bug
Category Core
Status Closed
Assigned To No-one
Operating System Windows
Severity Low
Priority Normal
Reported Version trunk
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Got this while compiling r12696 with MinGW, it's a linker error:

************************************
[SRC] Linking openttd.exe
win32.o(.text+0x97a):win32.cpp: undefined reference to `_set_error_mode(int)'
collect2: ld returned 1 exit status
make[1]: *** [openttd.exe] Error 1
************************************
(Are there any code tags?)

The line in question is 994: int _set_error_mode(int);
The problem is that this isn't included in the libraries so the linker complains.
So far changing it to "int _set_error_mode(int stuff) {return 0;}" *seems* to work.
This task depends upon

Closed by  Remko Bijker (Rubidium)
Sunday, 13 April 2008, 22:12 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Broken development environment.
Comment by Loïc GUILLOUX (glx) - Sunday, 13 April 2008, 21:18 GMT
It is included, as it works for me.
Comment by Desolator (Desolator) - Sunday, 13 April 2008, 21:25 GMT
Strange. I got MinGW-5.1.3 with GCC 3.4.5. Possibly it's not included anymore, I'm not sure. Or something might be wrong in my install.
Comment by Loïc GUILLOUX (glx) - Sunday, 13 April 2008, 21:34 GMT
Try updating mingw-runtime and w32api (I don't know which one is installed with MinGW-5.1.3).

And the _set_error_mode stuff is present in openttd source since r2954.
Comment by Desolator (Desolator) - Sunday, 13 April 2008, 21:43 GMT
Hmm, looks like I had corrupted files, as I reinstalled everything and now linking works.

Thanks.

// Madassasin

Loading...