You are not logged in.

#1 2024-03-30 20:48:20

ninioArg
Member
Registered: 2014-09-21
Posts: 19

Install a C++ compiler

How can I install a C++ compiler version different to the one from my OS?

It is well known that changing the OS compiler leads to system issues. What I want is to install a C++ compiler version independent from the one in my system.

Last edited by ninioArg (2024-03-30 23:51:58)

Offline

#2 2024-03-30 20:55:19

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,230

Re: Install a C++ compiler

https://wiki.archlinux.org/title/GNU_Co … d_versions

But I smell https://xyproblem.info

Why do you want to do that? What's your actual end goal?

Last edited by V1del (2024-03-30 20:56:57)

Offline

#3 2024-03-30 20:59:16

ninioArg
Member
Registered: 2014-09-21
Posts: 19

Re: Install a C++ compiler

V1del wrote:

https://wiki.archlinux.org/title/GNU_Co … d_versions

But I smell https://xyproblem.info

Why do you want to do that? What's your actual end goal?

Hi V1del,

Thanks for answering. The point is I need to experiment with new experimental language features, only present on the last version of the compiler.

Offline

#4 2024-03-30 21:23:15

loqs
Member
Registered: 2014-03-06
Posts: 18,917

Re: Install a C++ compiler

ninioArg wrote:

The point is I need to experiment with new experimental language features, only present on the last version of the compiler.

What experimental language features?  Which compiler do yo need to experiment with?  What happens when you when you try and use the features on the current compiler?

Offline

#5 2024-03-30 23:51:13

ninioArg
Member
Registered: 2014-09-21
Posts: 19

Re: Install a C++ compiler

loqs wrote:

What experimental language features?  Which compiler do yo need to experiment with?  What happens when you when you try and use the features on the current compiler?

Right now, Modules, but there are others down the road. I need to experiment with C++20 and C++23 standards. If I try with the one on my system, it just fails at compiling, as you can expect.

I'm interested in having another compiler available in my system, other than the system one. I understand this is the scenario I need for what I will be working on.

Last edited by ninioArg (2024-03-30 23:55:24)

Offline

#6 2024-03-31 00:00:21

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,230

Re: Install a C++ compiler

Take one of the "old version" PKGBUILDs as examples for how you can store the compiler in a different prefix, or just build it and run it from a local dir or so, without installing it into the rest of the system. But case in point, modules are going to be implemented in current GCC13, basically everything before C++23 should be working in the current version.

Offline

#7 2024-03-31 00:33:14

ninioArg
Member
Registered: 2014-09-21
Posts: 19

Re: Install a C++ compiler

V1del wrote:

Take one of the "old version" PKGBUILDs as examples for how you can store the compiler in a different prefix, or just build it and run it from a local dir or so, without installing it into the rest of the system. But case in point, modules are going to be implemented in current GCC13, basically everything before C++23 should be working in the current version.

Thanks for your input, V1del.

Offline

Board footer

Powered by FluxBB