[llvm-dev] I'm having problems compiling a program. Please help.
Michael Kruse via llvm-dev
llvm-dev at lists.llvm.org
Mon Jun 3 15:17:29 PDT 2019
Visual Studio comes with a batch file vcvarsall.bat that sets the
environment variables containing the paths to headers and libraries.
You can select the environment from the start menu, e.g. "Developer
Command Prompt for VS 2019" or "x64_x86 Cross Tools Command Prompt for
VS 2017".
Michael
Am Sa., 1. Juni 2019 um 17:17 Uhr schrieb 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
More information about the llvm-dev
mailing list