Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
75 Views

Compiler errors for C++17 with WSL 18.04

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
Highlighted
Employee
75 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