Author Topic: LLVM Clang 3.8.0 on CodeBlocks - Strange errors  (Read 19452 times)

Offline devhobby

  • Multiple posting newcomer
  • *
  • Posts: 11
LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« on: July 02, 2016, 04:34:24 pm »
Hello.

I've installed Clang from this link http://llvm.org/releases/download.html (PreBuilt Binaries -> Win64)

Then I've moved the LLVM folder inside the CodeBlocks directory.

Now, this is how CodeBlocks is set up:



When I go back and compile a simple Hello World program, this is what happens:



And these are the compiler options enabled



Any tip?
« Last Edit: July 02, 2016, 04:44:06 pm by gedamial »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #1 on: July 02, 2016, 06:22:09 pm »
nice screenshots, but sadly they don't help much. What would help is written here:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_(general)#Q:_How_do_I_report_a_compilation_problem_on_the_forums.3F

greetings

Offline devhobby

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #2 on: July 02, 2016, 06:39:38 pm »
Thanks for the reply.

I've compiled without CodeBlocks and this is the result:

Code
clang++ -std=c++14 -Wall -pedantic-errors -O2 -Wall  C:\Users\Michael\Desktop\testClang\main.cpp  && ./a.out

In file included from C:\Users\Michael\Desktop\testClang\main.cpp:1:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iostream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\istream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ios:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocnum:7:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\cmath:647:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xtgmath.h:8:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xtr1common:213:22: error:
      use of undeclared identifier 'char16_t'
        struct _Is_integral<char16_t>
                            ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xtr1common:219:22: error:
      use of undeclared identifier 'char32_t'
        struct _Is_integral<char32_t>
                            ^
In file included from C:\Users\Micky\Desktop\testClang\main.cpp:1:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iostream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\istream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ios:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocnum:10:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\streambuf:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xiosbase:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale:8:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdexcept:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\exception:7:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\type_traits:6:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef:404:14: error:
      use of undeclared identifier 'char16_t'
        struct hash<char16_t>
                    ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstddef:410:14: error:
      use of undeclared identifier 'char32_t'
        struct hash<char32_t>
                    ^
In file included from C:\Users\Micky\Desktop\testClang\main.cpp:1:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iostream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\istream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ios:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocnum:10:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\streambuf:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xiosbase:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale:8:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdexcept:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\exception:7:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\type_traits:524:45: error:
      '_To' does not refer to a value
                : integral_constant<bool, __is_assignable(_To, _From)>
                                                          ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\type_traits:521:16: note:
      declared here
template<class _To,
               ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\type_traits:524:50: error:
      '_From' does not refer to a value
                : integral_constant<bool, __is_assignable(_To, _From)>
                                                               ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\type_traits:522:8: note:
      declared here
        class _From>
              ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\type_traits:525:2: error:
      expected class name
        {       // determine whether _From can be assigned to _To
        ^
In file included from C:\Users\Micky\Desktop\testClang\main.cpp:1:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iostream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\istream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ios:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocnum:10:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\streambuf:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xiosbase:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale:8:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdexcept:7:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0:8:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\limits:611:33: error:
      use of undeclared identifier 'char16_t'
template<> class numeric_limits<char16_t>
                                ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\limits:901:33: error:
      use of undeclared identifier 'char32_t'
template<> class numeric_limits<char32_t>
                                ^
In file included from C:\Users\Micky\Desktop\testClang\main.cpp:1:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iostream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\istream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ios:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocnum:10:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\streambuf:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xiosbase:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale:8:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdexcept:7:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xmemory0:10:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xutility:8:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\utility:7:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iosfwd:267:21: error:
      use of undeclared identifier 'char16_t'
        struct char_traits<char16_t>
                           ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iosfwd:276:21: error:
      use of undeclared identifier 'char32_t'
        struct char_traits<char32_t>
                           ^
In file included from C:\Users\Micky\Desktop\testClang\main.cpp:1:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iostream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\istream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ios:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocnum:10:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\streambuf:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xiosbase:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale:8:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\stdexcept:7:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring:2654:22: error:
      use of undeclared identifier 'char16_t'
typedef basic_string<char16_t, char_traits<char16_t>, allocator<char16_t> >
                     ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring:2654:53: error:
      expected unqualified-id
typedef basic_string<char16_t, char_traits<char16_t>, allocator<char16_t> >
                                                    ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring:2656:22: error:
      use of undeclared identifier 'char32_t'
typedef basic_string<char32_t, char_traits<char32_t>, allocator<char32_t> >
                     ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xstring:2656:53: error:
      expected unqualified-id
typedef basic_string<char32_t, char_traits<char32_t>, allocator<char32_t> >
                                                    ^
In file included from C:\Users\Micky\Desktop\testClang\main.cpp:1:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\iostream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\istream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ostream:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\ios:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocnum:10:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\streambuf:6:
In file included from C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xiosbase:6:
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale:1004:30: error:
      use of undeclared identifier 'char16_t'
        class _CRTIMP2_PURE codecvt<char16_t, char, _Mbstatet>
                                    ^
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xlocale:1328:30: error:
      use of undeclared identifier 'char32_t'
        class _CRTIMP2_PURE codecvt<char32_t, char, _Mbstatet>
                                    ^
17 errors generated.

Well, it's not a CodeBlocks issue, so this thread shouldn't go on... but have you any tip for me?

I really don't know where to catch the problem!
« Last Edit: July 02, 2016, 06:42:39 pm by gedamial »

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #3 on: July 02, 2016, 06:45:24 pm »
(double-)Check the compiler (and linker) searchpaths for your target, project and (!) the global compilker section.

Offline devhobby

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #4 on: July 02, 2016, 06:53:28 pm »
(double-)Check the compiler (and linker) searchpaths for your target, project and (!) the global compilker section.

I don't get what you mean. From CodeBlocks, i checked everything and all "seems" to be ok.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #5 on: July 02, 2016, 08:18:49 pm »
First verify that the compiler works. This is done by compiling something in a cmd window.
Then we can tell you how to make it work inside codeblocks.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline devhobby

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #6 on: July 02, 2016, 08:29:53 pm »
First verify that the compiler works. This is done by compiling something in a cmd window.
Then we can tell you how to make it work inside codeblocks.

That's the point!

I moved to clang's folder and launched this command

clang++ -std=c++14 -Wall -pedantic-errors -O2 -Wall  C:\Users\Michael\Desktop\testClang\main.cpp  && ./a.out

and it gave me the same errors I got in codeblocks (see the post above). So I think it's a compiler problem.


But it's strange since I downloaded it from the official LLVM site.
« Last Edit: July 02, 2016, 08:31:29 pm by gedamial »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #7 on: July 02, 2016, 08:44:19 pm »
First verify that the compiler works. This is done by compiling something in a cmd window.
Then we can tell you how to make it work inside codeblocks.

He already posted that it errors out on the command line. It looks like a corrupted compiler installation.

Me, I would uninstall the compiler and then re-install it.
And, I would NOT cut and paste the compiler folder!!!!!!

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline devhobby

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #8 on: July 02, 2016, 09:02:20 pm »
First verify that the compiler works. This is done by compiling something in a cmd window.
Then we can tell you how to make it work inside codeblocks.

He already posted that it errors out on the command line. It looks like a corrupted compiler installation.

Me, I would uninstall the compiler and then re-install it.
And, I would NOT cut and paste the compiler folder!!!!!!


I've uninstalled and re-installed but this time the 3.7 version.

Now the only error I get is fatal error: 'iostream' file not found

Both in CodeBlocks and via command line

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #9 on: July 02, 2016, 10:48:12 pm »
Post the full re-build log.

I suggest reading it before posting because you likely forgot to name the source file with the extension ".cpp".

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline devhobby

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #10 on: July 02, 2016, 10:58:09 pm »
Post the full re-build log.

Nothing special, just


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #11 on: July 02, 2016, 11:23:20 pm »
Please read and follow the directions on the link.
http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

And, then post the full rebuild log as requested.

Tim S.

C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline devhobby

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #12 on: July 02, 2016, 11:30:42 pm »
Please read and follow the directions on the link.
http://wiki.codeblocks.org/index.php/FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

And, then post the full rebuild log as requested.

Code
-------------- Clean: Debug in testclang (compiler: LLVM Clang Compiler)---------------

Cleaned "testclang - Debug"

-------------- Build: Debug in testclang (compiler: LLVM Clang Compiler)---------------

clang++.exe -Weverything -fexceptions  -g  -Wall -std=c++11    -c C:\Users\Micky\Desktop\testclang\main.cpp -o obj\Debug\main.o
C:\Users\Micky\Desktop\testclang\main.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
         ^
1 error generated.
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 


Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 3353

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #14 on: July 02, 2016, 11:46:56 pm »
Please give more information on your Windows OS and Compiler.

I am trying to download LLVM 3.7.1 to test on Windows 7 SP1 (32 bit); but, I expect to NOT see the issue.
From here http://llvm.org/releases/download.html
Since, LLVM 3.8.0 64 bit; worked on Windows 7 SP1 (64 bit) to do a hello world program earlier in the day.

NOTE: I have never gotten LLVM to do a complex C++ program on Windows; but, I have only tried "hello world", the Code::Blocks IDE as things to build.

Do you know how to install and uninstall software on a Windows computer?
Because, I am starting to believe you have no idea on the correct way to install software.
What options are you picking during the installation of the software?
Did you uninstall the old software using the Windows Control panel?

Tim S.
 
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #15 on: July 02, 2016, 11:52:25 pm »
I did see the problem on Windows 7 SP1 (32 bit) using 3.7.?

Edit: I am thinking the CLang 3.7 downloads do NOT include all the compiler files.
Because 3.8 is twice as big.

Tim S.
« Last Edit: July 02, 2016, 11:57:41 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline devhobby

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #16 on: July 02, 2016, 11:56:49 pm »
Please give more information on your Windows OS and Compiler.

OS: Windows 10 64bit
Compiler: Clang download from here http://llvm.org/releases/download.html LLVM 3.7.1 > Clang for Windows (64-bit) (.sig)

Do you know how to install and uninstall software on a Windows computer?
Because, I am starting to believe you have no idea on the correct way to install software.
What options are you picking during the installation of the software?
Did you uninstall the old software using the Windows Control panel?

I've been a Windows user since forever
My answer to all those question is: of course

What options are you picking during the installation of the software?

I just set the destination folder to be Program Files(x86) > CodeBlocks and defined the PATH variable for Clang.

I don't know what other information you need...

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #17 on: July 03, 2016, 12:00:46 am »
Please give more information on your Windows OS and Compiler.

OS: Windows 10 64bit
Compiler: Clang download from here http://llvm.org/releases/download.html LLVM 3.7.1 > Clang for Windows (64-bit) (.sig)

Do you know how to install and uninstall software on a Windows computer?
Because, I am starting to believe you have no idea on the correct way to install software.
What options are you picking during the installation of the software?
Did you uninstall the old software using the Windows Control panel?

I've been a Windows user since forever
My answer to all those question is: of course

What options are you picking during the installation of the software?

I just set the destination folder to be Program Files(x86) > CodeBlocks and defined the PATH variable for Clang.

I don't know what other information you need...

Then, I suggest you need retraining!!!!!!
You should never put 64 bit files under "Program Files(x86)"!!
I normally also; do NOT use spaces in the path for compilers that are NOT native to Windows!
And you should NOT be installing the files inside another programs installation folder!

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline devhobby

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #18 on: July 03, 2016, 12:09:35 am »
You should never put 64 bit files under "Program Files(x86)"!!
Okay, I reinstalled Clang putting the folder into C:\ directly

do NOT use spaces in the path for compilers that are NOT native to Windows!
Okay, there are no spaces in C:\ directory
Even though the Clang installer automatically set its destination folder to Program Files which has spaces

And you should NOT be installing the files inside another programs installation folder!

Aaalright

Done everything. Result? Nothing.

Code
-------------- Clean: Debug in testclang (compiler: LLVM Clang Compiler)---------------

Cleaned "testclang - Debug"

-------------- Build: Debug in testclang (compiler: LLVM Clang Compiler)---------------

clang++.exe -Weverything -fexceptions  -g  -Wall -std=c++11    -c C:\Users\Micky\Desktop\testClang\main.cpp -o obj\Debug\main.o
C:\Users\Micky\Desktop\testClang\main.cpp:1:10: fatal error: 'iostream' file not found
#include <iostream>
         ^
1 error generated.


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #19 on: July 03, 2016, 12:17:05 am »
Looks like at least the 32 bit version of LLVM does NOT include the compiler headers like "iostream".

Going to get the laptop out of my car; likely the 64 bit versions also do NOT include the headers; but, somehow it worked earlier in the day on the laptop. I am guessing you will need to do research on where the headers are supposed to be downloaded from.

NOTE: LLVM and CLang are two separate things; you might need to download CLang++ along with the headers.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline devhobby

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #20 on: July 03, 2016, 12:30:17 am »
Looks like at least the 32 bit version of LLVM does NOT include the compiler headers like "iostream".

Going to get the laptop out of my car; likely the 64 bit versions also do NOT include the headers; but, somehow it worked earlier in the day on the laptop. I am guessing you will need to do research on where the headers are supposed to be downloaded from.

If you have news, I'd be glad to hear

Otherwise I guess I will let bygones be bygones with Clang on Windows


Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #21 on: July 03, 2016, 03:37:53 am »
From trying option of "-v" suggested here http://clang.llvm.org/docs/LibTooling.html#libtooling-builtin-includes

I found the the Windows system variable of "INCLUDE" changes the clang operation.

Likely my laptop has a "good"  "INCLUDE" value; and my desktop does NOT.
Note: I have no idea where the headers are supposed to be found.

I suggest once more finding a CLang support site.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline yvesdm3000

  • Almost regular
  • **
  • Posts: 225
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #22 on: July 03, 2016, 05:22:19 am »
Clang is a *compiler* and <iostreams> is a header of the STL *library*. The 2 are separate things although very often shipped together. Clang's implementation is here:  http://libcxx.llvm.org/   and doesn't seem to include a Windows port. You'll have to download and install another implementation of the STL library, like the gnu one (libstdc++)

Yves
Clang based code completion for Code::Blocks:   http://github.com/yvesdm3000/ClangLib

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #23 on: July 03, 2016, 05:23:54 am »
Clang is a *compiler* and <iostreams> is a header of the STL *library*. The 2 are separate things although very often shipped together. Clang's implementation is here:  http://libcxx.llvm.org/   and doesn't seem to include a Windows port. You'll have to download and install another implementation of the STL library, like the gnu one (libstdc++)

Yves

Thank you for that info on Clang.

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline devhobby

  • Multiple posting newcomer
  • *
  • Posts: 11
Re: LLVM Clang 3.8.0 on CodeBlocks - Strange errors
« Reply #24 on: July 03, 2016, 03:25:22 pm »
Nevermind...