News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Question about CB 13.12 with LLVM Clang .

Started by edison, February 19, 2014, 03:53:26 PM

Previous topic - Next topic

edison

I had downloaded the LLVM Clang compiler from here (http://llvm.org/releases/3.4/LLVM-3.4-win32.exe), and installed it to the D:\CodeBlocks\LLVM.
The compiler Search directries were setting as below:
[Compiler]
$(CODEBLOCKS)\MinGW\include
$(CODEBLOCKS)\MinGW\include\c++
$(CODEBLOCKS)\MinGW\lib\gcc\mingw32\4.8.1\include\c++
$(CODEBLOCKS)\MinGW\lib\gcc\mingw32\4.8.1\include\c++\mingw32
[Linker]
$(CODEBLOCKS)\MinGW\lib
$(CODEBLOCKS)\MinGW\lib\gcc\mingw32\4.8.1\include\c++
$(CODEBLOCKS)\MinGW\lib\gcc\mingw32\4.8.1\include\c++\mingw32

The Compiler's Installtation directory in Toolchain tab was setting as $(CODEBLOCKS)\LLVM.

There is not problem when I build the C++ project(creat by CB default C++ project template aka. Hello World ), but when I run the .exe file, the .exe would report failed and return 255 (0xFF) exit code.

the c++ code :
#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    return 0;
}

So is this a problem caused by Clang or missing something that need to setting/add?

stahta01

I would guess it means C++ under LLVM Clang with MinGW is still not ready for prime time.

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]

edison


stahta01

Quote from: edison on February 20, 2014, 03:01:06 PM
hmm, it's a problem cause by Clang..
http://tehsausage.com/clang-mingw-gcc-4-7

I am now trying MinGW gcc version 4.5.2 (tdm-1) SJLJ version and NOT getting that error.
I wanted to try the 4.6 version; but, I no longer have it installed.

Adv Compiler Setting to compiler static lib is wrong for Clang/Mingw

$lib_linker rs $static_output $link_objects


I changed "-r -s" to "rs" and it compiled CB TinyXML with many warnings.

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]