Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: edison on February 19, 2014, 03:53:26 pm

Title: Question about CB 13.12 with LLVM Clang .
Post by: edison on February 19, 2014, 03:53:26 pm
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?
Title: Re: Question about CB 13.12 with LLVM Clang .
Post by: stahta01 on February 19, 2014, 09:51:42 pm
I would guess it means C++ under LLVM Clang with MinGW is still not ready for prime time.

Tim S.
Title: Re: Question about CB 13.12 with LLVM Clang .
Post by: 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
Title: Re: Question about CB 13.12 with LLVM Clang .
Post by: stahta01 on February 20, 2014, 03:37:00 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
Code
$lib_linker rs $static_output $link_objects

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

Tim S.