char8_t

Pages: 12
You are a genius. Now I understand what this big table is. Thank you @George

Now I need only to update that gcc compiler, if someone can help I will appreciate it.

This is what I got so far:
I reached to this link: https://bigsearcher.com/mirrors/gcc/releases/gcc-12.2.0/. This link is mirror from https://gcc.gnu.org/gcc-12/
I downloaded gcc-12.2.0.tar.gz 2022-08-19 01:38 143M, But I got nowhere with it. I extracted that tar.gz. The file contains more than 100k files, but not even a single .exe(I searched for the .exe because I am looking for g++ or gcc). So I am assuming this is either a source code the compiler or a wrong file.

PS: My OS is windows 10
Please help

Last edited on
I don't think GCC distribute executable files.
The version of GCC that works on Windows is often known as MinGW.

I think you might want to use
https://www.mingw-w64.org/
or
https://nuwen.net/mingw.html
but I don't use Windows and have never installed MinGW on Windows so I'm afraid I cannot help you with any details.
Thank you @Peter

Notes:
I think the first link https://www.mingw-w64.org/ provides compiler only with gcc version 8.1.0
The second link https://nuwen.net/mingw.html is kinda working, but it is also tricky to got it working(many setups).

I am encountering now a different problem:

consider the code below:
1
2
const char8_t* str = u8"Hello";
std::cout << "ch: " << str << std::endl;


without the std::cout << "ch: " << str << std::endl; the code run just fine. But with it I got this error:

use of deleted function 'std::basic_ostream<char, _traits>& std::operator<<(std::basic_ostream....

Any idea what causing the problem?
MinGW-64 is now up to v10, as of 2022-04-04:
https://www.mingw-w64.org/changelog/

That doesn't mean the underlying GCC version is v10, it is the version number of MinGW-64. MinGW-64 10.0 uses GCC 12.1:
https://www.mingw-w64.org/downloads/

The packages are pre-built binaries, most have 11.2 or earlier GCC versions.

The only GCC-based compiler on Windows AFAIK that can use GCC 12.2 is MSYS2. That requires Win x64. 32-bit ain't gonna work, same as using Visual Studio 2022.
https://www.msys2.org/
Last edited on
ninja01 wrote:
use of deleted function 'std::basic_ostream<char, _traits>& std::operator<<(std::basic_ostream....

This has been discussed earlier in this thread. The standard library simply doesn't have good support for char8_t yet.
That was a very long journey. From finding a new softwares that extract some .tar.gz.maybe.your.dogs.name.in.future, to finally submit to the idea to use VS that will include for ME the latest facilities of the language, to install a new version of windows 10, because my windows 10 v.1803 is outdated
in the point of view of VS community 2022 that require windows 10 v.1909 or above(Is this some kinda of joke?)...

Fortunately, I learn so many things along the way, and I got everything set up for both MSVS and Code::blocks with latest gcc, and I am ready to go.

If someone wants the latest MinGW distribution, either He should use the "distro" in this link: https://nuwen.net/mingw.html that come with gcc 11.2.0, or The msys2 in this link: https://www.msys2.org/, that comes with gcc 12.2.0.

@Peter wrote:
This has been discussed earlier in this thread. The standard library simply doesn't have good support for char8_t yet.

I apologize for re-asking the same question, I did not understand most points discussed in this post, but I am reading more about the language right now that I start to comprehend some)

@George wrote:
That doesn't mean the underlying GCC version is v10, it is the version number of MinGW-64. MinGW-64 10.0 uses GCC 12.1:

I agree with you, but the downloaded folder does not come with any .exe. and here:

@George wrote:
https://www.mingw-w64.org/downloads/
The packages are pre-built binaries, most have 11.2 or earlier GCC versions.

@George, do you mean here I need to build those binaries myself?
VS community 2022 that require windows 10 v.1909


VS community 2022 v17.3 for C++ works fine with Windows 7.
Pre-built binaries means just that. Binaries that are already compiled for a particular compiler so you don't need to build the compiler executables and libraries yourself.

Pre-built binaries for MinGW-W64:

https://github.com/niXman/mingw-builds-binaries/releases

There are advantages of building the compiler binaries yourself, though.

I'm a programming hobbyist, self-taught, so I use pre-built binaries for my compilers on my Windows development machines. MSYS2 and Visual Studio 2022.

The MSYS2 installer and documentation:

https://www.msys2.org/

I have several 3rd party libraries installed as well. There's a package manager available, vcpkg, that takes the drudgery out of getting the libraries to work with your compiler(s).

https://vcpkg.io/en/index.html

vcpkg isn't just for VS. If you can use CMake it can work with Linux and MacOS as well as Windows compilers other than VS.
One thing that may not be of much importance at this time, but should be. Especially if building for Windows.

Building apps for 32- or 64-bit. Windows x64 can run 32-bit executables, Win x86 can run only 32-bit exes.

Other operating systems might have similar attributes and restrictions. I don't have any direct experience creating apps for Linux or Mac.

Console mode C++ apps really don't present any particular difficulty when compiling for x86 or x64 mode in my experience. The compiler and linker does all the necessary grunt work with the code.

WinAPI apps do require some adjustments to the WinAPI specific data types.

https://learn.microsoft.com/en-us/windows/win32/winprog64/programming-guide-for-64-bit-windows

https://learn.microsoft.com/en-us/windows/win32/winprog/windows-data-types
https://learn.microsoft.com/en-us/windows/win32/winprog64/the-new-data-types
Topic archived. No new replies allowed.
Pages: 12