[llvm-dev] I'm having problems compiling a program. Please help.

Zachary Turner via llvm-dev llvm-dev at lists.llvm.org
Mon Jun 3 13:39:16 PDT 2019


You need to install Visual Studio for headers and libraries.  It's possible
to make clang work with LLVM's C++ standard library (libc++), but it is not
trivial, and that *still* won't get you a C Runtime Library.  Note that
while Visual Studio is proprietary software, Visual Studio *Community
Edition* has a quite permissive license.

https://visualstudio.microsoft.com/dev-essentials/



On Sat, Jun 1, 2019 at 5:58 PM mayuyu.io via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> AFAIK You have to install Windows 10 SDK which comes with Visual Studio.
> Clang itself doesn’t provide headers.
>
> But I dont know anything about Windows so I could be very wrong here
>
> Zhang
>
> 在 2019年6月1日,20:17,Phyl Bean via llvm-dev <llvm-dev at lists.llvm.org> 写道:
>
>
> I'm not sure if this is the correct place to email for this kind of thing,
> but I couldn't find any other contact info.  Also, I am new to llvm, so
> please try to be understanding.
>
> I keep getting an error when I try to compile a simple Hello World program
> (as a test)(error included below).
>
> The error is:
>
> Clang: warning: unable to find a Visual Studio installation; try running
> Clang from a developer command prompt [-Wmsvc-not-found]
> hello.c:1:10: fatal error: 'string.h' file not found
> #include <string.h>
>          ^~~~~~~~~~
> 1 error generated
>
> It looks as if Clang is looking for a Visual Studio installation for
> missing C library headers (string.h, stdio.h, math.h, etc.). Does
> Clang/llvm come with C library headers? If not, where can I get them?  I
> don't want to install Visual Studio because (to my understanding) it's
> proprietary software. I've included the program I'm trying to compile
> (hello.c) below.
>
>
> #include <string.h>
> #include <stdio.h>
> int main(void){
>     print("Hello World!");
>     return 0;
> }
>
> --
>
>
>
> Please note new suite number
> ******
> Phyl Bean
> Attorney at Law
> 207 N. Chestnut Street, Suite 240
> Chaska, Minnesota 55318
> (Parking is behind building)
> Ph:  (952) 217-4473
> Fax:  (952) 955-9648
> Cell: (612) 384-9062
> phylbean at gmail.com
> www.phylbeanlaw.com
>
> CONFIDENTIALITY NOTICE: The contents of this email message and any
> attachments are intended solely for the addressee(s) and may contain
> confidential and/or privileged information and may be legally protected
> from disclosure. If you are not the intended recipient of this message or
> their agent, or if this message has been addressed to you in error, please
> immediately alert the sender by reply email and then delete this message
> and any attachments. If you are not the intended recipient, you are hereby
> notified that any use, dissemination, copying, or storage of this message
> or its attachments is strictly prohibited.
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190603/1552b296/attachment-0001.html>


More information about the llvm-dev mailing list