undefined identifier FILE for mingw
    Innot Sagg 
    donovinsbbkgbi at gmail.com
       
    Tue Jul  7 06:44:45 UTC 2020
    
    
  
On Monday, 6 July 2020 at 21:23:50 UTC, kinke wrote:
> On Monday, 6 July 2020 at 13:49:31 UTC, Innot Sagg wrote:
>> To fix this in druntime, we need a new version like: 
>> CRuntime_Mingw ?
>>
>> or should reuse CRuntime_Glibc ?
>
> Yeah, MinGW is a mess - it's actually based on the MS runtime, 
> but overrides some MS symbols (e.g., all `long double` math 
> functions, because they use 80-bit, not 64-bit as MSVC, and so 
> also the scanf/printf function families) and adds some new 
> functions for C99/Posix/GNU compatibility. [Most of these are 
> obsolete by now since the MS runtime provides almost full C99 
> compatibility since their 2015 runtime.]
>
> So in some cases, it would be CRuntime_Microsoft, in others 
> CRuntime_Glibc, and in some others probably resorting to 
> already existing version `MinGW` to differentiate.
Thanks for the explain.
I think there is a bug:
==============================================
@nogc nothrow:
struct A {
	@disable this(this);
}
extern(C) int main(){
         return 0;
}
==============================================
ldc2 -betterC test.d -flto=full -mtriple=i686-w64-mingw32
lld-link: error: undefined symbol: __D4test1A10__postblitMFZv
>>> referenced by test.d
>>>               test.o
lld-link: error: undefined symbol: 
__D4test1A15__fieldPostblitMFNaNbNiNfZv
>>> referenced by test.d
>>>               test.o
clang-10: error: linker command failed with exit code 1 (use -v 
to see invocation)
    
    
More information about the digitalmars-d-ldc
mailing list