Author Topic: Question about CB 13.12 with LLVM Clang .  (Read 31964 times)

Offline edison

  • Multiple posting newcomer
  • *
  • Posts: 53
Question about CB 13.12 with LLVM Clang .
« 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?

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Question about CB 13.12 with LLVM Clang .
« Reply #1 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.
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 edison

  • Multiple posting newcomer
  • *
  • Posts: 53
Re: Question about CB 13.12 with LLVM Clang .
« Reply #2 on: February 20, 2014, 03:01:06 pm »
hmm, it's a problem cause by Clang..
http://tehsausage.com/clang-mingw-gcc-4-7

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7588
    • My Best Post
Re: Question about CB 13.12 with LLVM Clang .
« Reply #3 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.
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