I recently upgraded from TDM-GCC v4.9.2 to V5.1.0
All of a sudden I started getting the problem described in this link.
https://sourceware.org/bugzilla/show_bug.cgi?id=17910
I thought I would mention it just incase you did not know about it.
COMPILE64.bat
REM @set PATH=C:\TDM-GCC-64-5.1.0\bin <--- Gets error
@set PATH=C:\TDM-GCC-64-4.9.2\bin <----- Works fine
@set SRCDIR=.\
@set SDKDIR=C:\SDK213
echo %PATH%
g++ -m64 -shared -Wall -O2 -s -DXPLM200 -DXPLM210 -DIBM=1 -mwindows -o 64\win.xpl %SRCDIR%\SimpleFMC.c -I %SDKDIR%\CHeaders\XPLM -I %SDKDIR%\CHeaders\Widgets %SDKDIR%\Libraries\Win\XPLM_64.lib %SDKDIR%\Libraries\Win\XPWidgets_64.lib
OUTPUT
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Users\dlwhite>cd c:\MyPlugins\SimpleFMC
c:\MyPlugins\SimpleFMC>compile64
c:\MyPlugins\SimpleFMC>REM @set PATH=C:\TDM-GCC-64\bin
c:\MyPlugins\SimpleFMC>REM @set PATH=C:\MinGW-64\mingw64\bin
c:\MyPlugins\SimpleFMC>echo C:\TDM-GCC-64-5.1.0\bin
C:\TDM-GCC-64-5.1.0\bin
c:\MyPlugins\SimpleFMC>g++ -m64 -shared -Wall -O2 -s -DXPLM200 -DXPLM210 -DIBM=1
-mwindows -o 64\win.xpl .\SimpleFMC.c -I C:\SDK213\CHeaders\XPLM -I C:\SDK213\
CHeaders\Widgets C:\SDK213\Libraries\Win\XPLM_64.lib C:\SDK213\Libraries\Win\XPW
idgets_64.lib
C:\SDK213\Libraries\Win\XPLM_64.lib: error adding symbols: File format not recog
nized
collect2.exe: error: ld returned 1 exit status
c:\MyPlugins\SimpleFMC>
Anonymous
eh you cannot blindly link to microsoft libraries, you need to create an import library specifically for mingw, and even then it might not work. Some static libraries can be linked but there is no guarantee.