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

Compiler errors for C++17 with WSL 18.04

Buddhika_C_
Novice
975 Views

Firstly, Let me explain briefly the environment :

  • Windows x64 Platform - Windows 10 1803 (build 17134.81)
  • Windows Linux Subsystem - Ubuntu 18.04 (via Windows Store)
  • GCC version installed on WSL - GCC 8.0
  • Clang version installed on WSL - Clang 6.0
  • Intel Parallel Studio Version - Intel Parallel Studio XE 2018 update 2

       I tried to compile and run simple dummy C++ program with std::thread and under C++17 standard flag. The code example is given below:
      

#include<iostream>
#include<vector>
#include<thread>

void foo()
{
        std::cout<<"OKAY"<<std::endl;
}

int main()
{
        std::vector<int> x={1,2,3};
        auto y = x.capacity();
        std::thread t(foo);
        t.join();
        std::cout<<y<<std::endl;
        return 0;
}

the following images shows relevant information:

gcc_ver.PNG

 

 

 

 

clangver.PNG


 

 

 

iccver.PNG

 

 

 

 

 

 

 

 

Errors occurred:

error1.PNG

 

error2.PNG

 

 

 

 

error3.PNG

0 Kudos
1 Reply
Judith_W_Intel
Employee
975 Views

 

You are using a version of our compiler which does not support GCC 8.x in particular it does not have the new __integer_pack builtin implemented.

Please update to 18.0 update 3.

Judy

0 Kudos
Reply