Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

C++17 string_view not found

25 views
Skip to first unread message

Josue Andrade Gomes (josuegomes@gmail.com) [via djgpp@delorie.com]

unread,
Sep 18, 2021, 7:31:58 AM9/18/21
to dj...@delorie.com
Hi,

Trying to build this simple program:

#include <string>

int main()
{
std::string s("Hello world");
}

with:
gpp --std=c++17 -c SIMPLE.CPP

results in error:
In file included from c:/djgpp/include/cxx/10/string:55,
from SIMPLE.CPP:1:
c:/djgpp/include/cxx/10/bits/basic_string.h:48:11: fatal error:
string_view: No such file or directory (ENOENT)
48 | # include <string_view>
|
compilation terminated.

However with:
gpp -c SIMPLE.CPP

It compiles fine.

The file DJGPP/INCLUDE/CXX/10/STRING.VIE is there.

I have installed the following files:
djdev205.zip
bnu2351b.zip
gcc1030b.zip
gpp1030b.zip
mak43b.zip

Running in a DOSBOX under Ubuntu Linux.

Any idea?
josue

pif...@gmail.com

unread,
Sep 20, 2021, 4:29:21 PM9/20/21
to
Hi Josue,
You are using a DOS environement without long file name suport.
Install a tool that will give it to you on dosbox or try to use a cross compiler.

Josue Andrade Gomes (josuegomes@gmail.com) [via djgpp@delorie.com]

unread,
Sep 20, 2021, 5:05:15 PM9/20/21
to dj...@delorie.com
Em seg., 20 de set. de 2021 às 17:45, pif...@gmail.com
(pif...@gmail.com) [via dj...@delorie.com] <dj...@delorie.com>
escreveu:
Thank you for the reply. I'm able to include files with long names eg:

#include <unordered_set>
#include <string_view>

int main()
{
}

Gives no error on unordered_set but gives an error on string_view.

0 new messages