<?xml version="1.0" encoding="utf-16"?><html><head><style><![CDATA[#x1da73bd008224f27a144a1bbbe1075eb .Normal{
        margin:1pt;
        margin-top:1pt;
        margin-bottom:1pt;
        margin-left:0pt;
        margin-right:0pt;
        text-indent:0pt;
        font-family:'Times New Roman';
        font-size:10pt;
        color:Black;
        font-weight:normal;
}
#x1da73bd008224f27a144a1bbbe1075eb h1{
        margin:1pt;
        margin-top:12pt;
        margin-bottom:3pt;
        margin-left:0pt;
        margin-right:0pt;
        text-indent:0pt;
        font-family:'Arial';
        font-size:18pt;
        color:Black;
        font-weight:bold;
}
#x1da73bd008224f27a144a1bbbe1075eb h2{
        margin:1pt;
        margin-top:12pt;
        margin-bottom:3pt;
        margin-left:0pt;
        margin-right:0pt;
        text-indent:0pt;
        font-family:'Arial';
        font-size:16pt;
        color:Black;
        font-weight:bold;
}
#x1da73bd008224f27a144a1bbbe1075eb h3{
        margin:1pt;
        margin-top:12pt;
        margin-bottom:3pt;
        margin-left:0pt;
        margin-right:0pt;
        text-indent:0pt;
        font-family:'Arial';
        font-size:14pt;
        color:Black;
        font-weight:bold;
}
#x1da73bd008224f27a144a1bbbe1075eb .PageBreak{
        page-break-after:always;
}
#x1da73bd008224f27a144a1bbbe1075eb .tm5{
        font-size:12pt;
}
#x1da73bd008224f27a144a1bbbe1075eb .tm6{
        margin-left:36pt;
}
#x1da73bd008224f27a144a1bbbe1075eb .tm7{
        margin-left:36pt;
        margin-right:36pt;
}
#x1da73bd008224f27a144a1bbbe1075eb .tm8{
        font-family:'Courier New';
}
#x1da73bd008224f27a144a1bbbe1075eb .tm9{
        font-style:italic;
        color:blue;
        font-family:'Courier New';
}
#x1da73bd008224f27a144a1bbbe1075eb .tm10{
        color:White;
        font-family:'Courier New';
        font-weight:bold;
}
#x1da73bd008224f27a144a1bbbe1075eb .tm11{
        margin-right:0pt;
}
#x1da73bd008224f27a144a1bbbe1075eb .tm12{
        font-family:'Courier New';
        font-weight:bold;
}
#x1da73bd008224f27a144a1bbbe1075eb .tm13{
        color:#F00000;
        font-family:'Courier New';
}]]></style>

<style id="css_styles"><![CDATA[
blockquote.cite { margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc }
blockquote.cite2 {margin-left: 5px; margin-right: 0px; padding-left: 10px; padding-right:0px; border-left: 1px solid #cccccc; margin-top: 3px; padding-top: 0px; }
a img { border: 0px; }
ol, ul { list-style-position: inside } 
body { font-family: Tahoma; font-size: 12pt;   }
]]></style>
</head>
<body><div id="x1da73bd008224f27a144a1bbbe1075eb">
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">Hello,</span></p>
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5"> </span></p>
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">I’m trying to get a new compiler working because GCC is simply not working on my system.  I’ve heard great things about LLVM / CLang, and would like to try it out, but I’m
having trouble getting it to work at all.</span></p>
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5"> </span></p>
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">I installed LLVM-4.0.1-win64.exe on Windows 7 64-bit, and I’m trying to get it working with the Code::Blocks IDE.</span></p>
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">Code::Blocks wants the following information in its toolchain entered into executables dialog.</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">What it wants                                          My
best guess</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">C Compiler                                          clang.exe</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">C++ Compiler                                          clang++.exe</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">Linker for dynamic libs:              llvm-lib.exe</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">Linker for static libs:                            llvm-ar.exe</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">Debugger:                                          GDB/CDB
debugger</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">                                                        
(dropdown list, this is the only option.)</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">Resource compiler:                            windres.exe
(not in clang set.)</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">Make program                            mingw32-make.exe
(not in clang set.)</span></p>
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">Are these correct?  Does LLVM / Clang come with a Windows resource compiler and make program?</span></p>
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5"> </span></p>
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">When I try to compile a main() that simply increments a number and returns, </span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">using namespace std;</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8"> </span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">int main()</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">{</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">    int j = 0;</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">    for (int i = 0; i < 1000; i++) j++;</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">    return j - 1000;</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">}</span></p>
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">I get the following messages:</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">clang++.exe -Weverything -fexceptions  -O2     -c "E:\Files and Documents\Development\CompilerBasicTest\main.cpp" -o obj\Release\main.o</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><em><span class="tm9">E:\Files and Documents\Development\CompilerBasicTest\main.cpp:3:17: warning: using directive refers to implicitly-defined namespace 'std'</span></em></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">using namespace std;</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">                ^</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">1 warning generated.</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">llvm-lib.exe  -o bin\Release\CompilerBasicTest.exe obj\Release\main.o  -s  </span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">ignoring unknown argument: -o</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">ignoring unknown argument: -s</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">bin\Release\CompilerBasicTest.exe: no such file or directory</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><strong><span class="tm10">Process terminated with status 1 (0 minute(s), 0 second(s))</span></strong></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><strong><span class="tm10">0 error(s), 1 warning(s) (0 minute(s), 0 second(s))</span></strong></p>
<p class="Normal tm11" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5"> </span></p>
<p class="Normal tm11" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">So even without the standard libraries, I’m having trouble with the most basic compilation and building, but I have no clue what to do.</span></p>
<p class="Normal tm11" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5"> </span></p>
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">When I try to build a basic Hello World program:</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">#include <iostream></span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8"> </span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">using namespace std;</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8"> </span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">int main()</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">{</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">    cout << "Hello world!" << endl;</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">    return 0;</span></p>
<p class="Normal tm6" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">}</span></p>
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">I get the following messages in the build log</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><strong><span class="tm12">-------------- Build: Release in CompilerBasicTest (compiler: LLVM Clang Compiler)---------------</span></strong></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8"> </span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">clang++.exe -Weverything -fexceptions  -O2     -c "E:\Files and Documents\Development\CompilerBasicTest\main.cpp" -o obj\Release\main.o</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm13">E:\Files and Documents\Development\CompilerBasicTest\main.cpp:1:10: fatal error: 'iostream' file not found</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">#include <iostream></span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">         ^~~~~~~~~~</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><span class="tm8">1 error generated.</span></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><strong><span class="tm10">Process terminated with status 1 (0 minute(s), 0 second(s))</span></strong></p>
<p class="Normal tm7" xmlns="http://www.w3.org/1999/xhtml"><strong><span class="tm10">1 error(s), 0 warning(s) (0 minute(s), 0 second(s))</span></strong></p>
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">I also get a similar message for <cstdlib>.  How do I get the standard C and C++ libraries?</span></p>
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5"> </span></p>
<p class="Normal tm11" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">Once I get basic compilation working with the standard c / c++ include files, I’m going to have to get it working for making actual windows programs.  I have TDM’s MinGW.
 Is there anything special I need to do to get clang to recognize <windows.h> and other Windows OS include files, or do I just point the compiler search paths at MinGW?</span></p>
<p class="Normal tm11" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5"> </span></p>
<p class="Normal tm11" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">I’m sorry if these questions have already been asked and answered, but I haven’t found a useful way to search the cfe-users archives.  (Does the BSD community have an acquired
allergy to off-the-shelf forum software?  Just asking.)</span></p>
<p class="Normal tm11" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5"> </span></p>
<p class="Normal tm11" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">Any help would be appreciated.</span></p>
<p class="Normal tm11" xmlns="http://www.w3.org/1999/xhtml"><span class="tm5">Thanks.</span></p>
<p class="Normal" xmlns="http://www.w3.org/1999/xhtml"> </p></div>
</body></html>