• C++17 string_view not found

    From [via djgpp@delorie.com]" @21:1/5 to All on Sat Sep 18 08:31:29 2021
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From pif0017@gmail.com@21:1/5 to All on Mon Sep 20 13:29:20 2021
    Le samedi 18 septembre 2021 à 13:31:58 UTC+2, Josue Andrade Gomes (josuegomes@gmail.com) [via djgpp@delorie.com] a écrit :
    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

    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From [via djgpp@delorie.com]" @21:1/5 to All on Mon Sep 20 18:04:53 2021
    Em seg., 20 de set. de 2021 às 17:45, pif...@gmail.com
    (pif0017@gmail.com) [via djgpp@delorie.com] <djgpp@delorie.com>
    escreveu:

    Le samedi 18 septembre 2021 à 13:31:58 UTC+2, Josue Andrade Gomes (josuegomes@gmail.com) [via djgpp@delorie.com] a écrit :
    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

    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.


    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)