Building LDC on windows, woe is me!
claptrap
clap at trap.com
Mon Aug 21 08:55:02 UTC 2023
On Monday, 21 August 2023 at 08:15:16 UTC, kinke wrote:
> On Sunday, 20 August 2023 at 00:12:06 UTC, claptrap wrote:
>> Ok got as far as generating NINJA build files, but now the
>> build is failing...
>>
>>
>> C:\LDCDEV\build-ldc-x64>ninja
>> [1/104] Linking CXX executable bin\FileCheck.exe
>> FAILED: bin/FileCheck.exe
>>
>> error LNK2019: unresolved external symbol __std_find_trivial_8
>> error LNK2001: unresolved external symbol __std_find_trivial_1
>> error LNK2001: unresolved external symbol
>> __std_init_once_link_alternate_names_and_abort
>>
>> and others
>>
>> Actual output is prob 1000 lines but seems to be mostly
>> unresolved eternal symbols, in llvm.
>>
>> Any ideas?
>
> I guess you're using a prebuilt LLVM but a non-matching Visual
> C++ version. Our prebuilt LLVM is built with VS 2022 and clang
> 15. As stated in
> https://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_using_MSVC#Building_LLVM, you'll need to build LLVM yourself in such a case.
Thanks, I managed to get it all to work, I had to build llvm from
scratch as you suggest.
There were a few other things tripping me up but I got there in
the end. I just deleted everything and ran though the
instructions more carefully. With what I learned from the first
try it all went smoothly.
Making sure everything was "run as administrator" was probably
the main issue. Like for some reason if I forgot to run the shell
as administrator, CMAKE would run, but it would error out on odd
things. Like it would detect the compilers, but not the compiler
ABI.
More information about the digitalmars-d-ldc
mailing list