Clang: windows.h not found.

Started by Quin, February 25, 2025, 01:23:59 PM

Previous topic - Next topic

Quin

I installed the latest LLVM toolchain from the GitHub releases page, and when trying to build with BCX, I get the error that windows.h cannot be found. I had to check the link internal manifest file to make it recognize itself as compiling for windows, but then it seemed to almost work, minus the missing header.
C:\Users\Quin\git\Test\Test.c:14:10: fatal error: 'windows.h' file not found
Has anyone seen this and/or knows how to solve it?
Thanks.
-Quin.
GitHub

MrBcx

Usually, you should have MS Visual Studio ( or MS build tools + Windows SDK ) already installed  before installing LLVM/Clang

I don't normally build BCX inside BED, I use a batch file because the translate/compile needs to be done three times.
But as you can see below, BED builds BCX 8.2.5 just fine for me using Clang (rc2).


BCX BASIC to C/C++ Translator (c) 1999-2025 by Kevin Diggins
Version 8.2.5 (02/25/2025) Compiled using LLVM-Clang (20.1.0) for 64-bit Windows
[Lines In: 38473] [Lines Out: 41810] [Statements: 34025] [Time: 0.92 Sec's]
BCX translated [Bc.Bas] to [Bc.C] for a C Compiler
**************************************************************************
Clang is compiling (C:\Bc\Bc) as a 64-bit CONSOLE app
CLANG successfully built [ C:\Bc\Bc.exe ]
**********************************************************************



Quin

Kevin,
I do have the build tools installed, but not through visual studio, I just have the C/C++ stuff at c:\BuildTools. My BED batch files use this path just fine, but I think I need to reconfigure my Clang to do so.
-Quin.
GitHub

Robert

Quote from: Quin on February 25, 2025, 03:00:34 PM
Kevin,
I do have the build tools installed, but not through visual studio, I just have the C/C++ stuff at c:\BuildTools. My BED batch files use this path just fine, but I think I need to reconfigure my Clang to do so.

Reconfigure ? Good luck with that. Below is a link to "Compiling with Clang without Visual Studio"
https://www.vincentparizet.com/blog/posts/clang_without_visual_studio/

Quin

Quote from: Robert on February 25, 2025, 03:23:23 PM
Reconfigure ? Good luck with that. Below is a link to "Compiling with Clang without Visual Studio"
https://www.vincentparizet.com/blog/posts/clang_without_visual_studio/
Okay...I'm now running back to my Pelles, MSVC, and MinGW, the second of them being the one that's recently gotten the most of my love due to its tiny binaries with the UCRT and blazingly fast compilation times on my 16-core machine compared to MinGW.

Talk about scary...holy crap. I thought CMake prepared me for anything. Nope, nope not clang. Wooow
-Quin.
GitHub