Newbie linker errors - still missing _fltused _tls_index _tls_used localtime tzset mainCRTStartup

Rainer Schuetze r.sagitario at gmx.de
Sun Sep 8 08:08:12 UTC 2019



On 08/09/2019 00:30, malpropism wrote:
> I just ported my Java application to D, got it to compile, but not to link.
> 
> I'm using Windows 10 64 bit, DMD 2.088.0 , Visual D 0.50.1.  This would
> be a C/C++ project in Visual Studio with only D code.
> 
> With my first attempt, I'm missing 65 externals, 328 errors.
> 
> I added these two files
> 
> ucrt.lib
> vcruntime.lib
> 
> to the Additional Dependencies in the linker property pages and have my
> missing external count down to 6, 70 errors.
> 
> I'm missing the following 6 symbols:
> 
> _fltused _tls_index _tls_used localtime tzset mainCRTStartup
> 
> What other libs would I need to add to the linker's additional
> dependencies?

I suspect you have disabled the C runtime library selection in the D
compilation options to build against the shared C runtime DLLs (you can
select that, too). Or your code might be missing a main function in
which case the selection might not be embedded into any object file.

In this case, you should add msvcrt.lib instead of vcruntime.lib.
Depending on used functionality you will also need
legacy_stdio_definitions.lib.


More information about the Digitalmars-d-learn mailing list