Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.
7942 Discussions

Hello World not working with icpc on Ubuntu 13.10

Vishal1
Beginner
374 Views

Hi,

  After running into problems compiling some libraries that use STL classes with icpc 13.1.3 on Ubuntu 13.10 with g++ 4.8.1, I'm having trouble getting the following Hello World program to work -

/*#include <complex>*/
#include <iostream>

//using namespace std;

int main() {
    /*complex<double> z;*/
    std::cout << "Hello World!" << std::endl;
    return 0;
    }

 icpc test2.cpp -o test2.o/usr/include/c++/4.8/bits/allocator.h(92): error: __allocator_base is not a template
      class allocator: public __allocator_base<_Tp>
                              ^

/usr/include/c++/4.8/bits/allocator.h(92): error: not a class or struct name
      class allocator: public __allocator_base<_Tp>
                              ^

compilation aborted for test2.cpp (code 2)

Can anyone please tell me how to fix this?

0 Kudos
3 Replies
Vladimir_P_1234567890
373 Views

As I undertand Ubuntu 13.10 is out of support OS list for 13.1.3. You need to update the compiler to one that supports it. 

Or you can try to use gcc 4.7 together with 13.1.3 instead of gcc 4.8

--Vladimir

0 Kudos
Vishal1
Beginner
374 Views

I thought that the most recent version of icpc waas 13.1.3 (with the ComposerXE 13 SP1). Is there a more recent version that I can get with my free student license?

0 Kudos
Vladimir_P_1234567890
374 Views

There was an announcement yesterday that Intel® C++ Composer XE for Linux* 2013 SP1 Update 1 was released. it contains compiler version 14 update 1. Release notes say that gcc 4.8 is supported now. Check your download page. If you have problems with access using your student license pls repeat the question and other people will answer to that question.

--Vladimir

0 Kudos
Reply