News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

LLVM Clang 3.8.0 on CodeBlocks - Strange errors

Started by devhobby, July 02, 2016, 04:34:24 PM

Previous topic - Next topic

stahta01

#15
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.
C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

devhobby

Quote from: stahta01 on July 02, 2016, 11:46:56 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)

Quote from: stahta01 on July 02, 2016, 11:46:56 PM
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

Quote from: stahta01 on July 02, 2016, 11:46:56 PM
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...

stahta01

Quote from: gedamial on July 02, 2016, 11:56:49 PM
Quote from: stahta01 on July 02, 2016, 11:46:56 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)

Quote from: stahta01 on July 02, 2016, 11:46:56 PM
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

Quote from: stahta01 on July 02, 2016, 11:46:56 PM
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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

devhobby

Quote from: stahta01 on July 03, 2016, 12:00:46 AM
You should never put 64 bit files under "Program Files(x86)"!!
Okay, I reinstalled Clang putting the folder into C:\ directly

Quote from: stahta01 on July 03, 2016, 12:00:46 AM
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

Quote from: stahta01 on July 03, 2016, 12:00:46 AM
And you should NOT be installing the files inside another programs installation folder!

Aaalright

Done everything. Result? Nothing.


-------------- 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.



stahta01

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

devhobby

Quote from: stahta01 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.

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

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


stahta01

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++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

yvesdm3000

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:   [url="http://github.com/yvesdm3000/ClangLib"]http://github.com/yvesdm3000/ClangLib[/url]

stahta01

Quote from: yvesdm3000 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

Thank you for that info on Clang.

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

devhobby