1

I am quite new to c++,and this is my development configuration:

llvm 3.5
gcc+  4.8
ubuntu 14.04 64bit
eclipse 4.3 

This is a "hello world" content generated by eclipse

#include <iostream>
using namespace std;

int main() {
   cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
   return 0;
}

In the beginning,eclipse refuses to compile and complain:

Program "llvm-g++" not found in PATH
Program "llvm-gcc" not found in PATH

after I made two symbolic links:

sudo ln -s /usr/bin/llvm-g++-4.8 /usr/bin/llvm-g++
sudo ln -s /usr/bin/llvm-gcc-4.8 /usr/bin/llvm-gcc

Eclipse starts to compile,but give me these errors:

Info: Internal Builder is used for build
llvm-g++ -O0 -emit-llvm -g3 -Wall -c -fmessage-length=0 -o src/HelloWorld.bc ../src    /HelloWorld.cpp 
*** WARNING *** there are active plugins, do not report this as a bug unless you can     reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_FINISH_UNIT               | dragonegg
PLUGIN_FINISH                    | dragonegg
PLUGIN_START_UNIT                | dragonegg
PLUGIN_ALL_IPA_PASSES_END        | dragonegg
../src/HelloWorld.cpp: In function ‘main’:
../src/HelloWorld.cpp:13:10: internal compiler error: Segmentation fault
  cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
      ^

Please tell me what I did wrong here?

taocp
  • 23,276
  • 10
  • 49
  • 62
Alex Luya
  • 9,412
  • 15
  • 59
  • 91

0 Answers0