Quantcast
Channel: Intel® Software - Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1175

Filesystem library: undefined reference to .extension()

$
0
0

Hi!

I've attached some driver code to explain the filesystem library issue I'm facing with my larger project:

Test Code (test.cpp):

#include <iostream>
#include <experimental/filesystem>

namespace fs = std::experimental::filesystem;

int main() {
    std::cout << fs::path("").extension() << std::endl;
    
    return 0;
}

Compilation commands (tried both):

icc test.cpp -lstdc++fs -std=c++17

icpc test.cpp -lstdc++fs -std=c++17

Here's what's spit out:

In function `main':
test.cpp:(.text+0x79): undefined reference to `std::experimental::filesystem::v1::__cxx11::path::_M_find_extension[abi:cxx11]() const'

ICC Version:

icc (ICC) 19.0.3.199 20190206

OS Version (as reported by cat /etc/issue):

Ubuntu 18.04.2 LTS

Could this be related to: https://software.intel.com/en-us/forums/intel-c-compiler/topic/844541 ??

TCE Open Date: 

Thursday, February 13, 2020 - 09:43

Viewing all articles
Browse latest Browse all 1175

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>