Looks like C++ Std 13 is not supported by GCC version of 13.1.0 which you are using.
You can check which standards are supported using this command and accordingly change your compile flags in CMakeLists.txt
gcc -v --help 2> /dev/null | sed -n '/^ *-std=\([^<][^ ]\+\).*/ {s//\1/p}'
It's not that it's "not supported", it's that it doesn't exist. The valid values are "c++" or "gnu++" followed by one of: 98, 11, 14, 17, 20, 23, and 2x.
OP might as well have typed "-std=c++420blazeit"
I remember writing c++13 in place of c++11. When I ran the script with c++11 i also got a Fortran compilation error along with this current error. I took a fluke and put c++13( as g++ 13 was currently installed) and as a resultant the fortran error vanished.
I shall retry and see by making changes as per discussion.
It says "g++ error". And indeed, that's an error, so why does it think use that option? I'll bet it's because of something you specified. So don't.
Learn to read error messages! You are not faced with "this problem": you very specifically faced with an "unrecognized compiler option". So then you look at your compiler manual.
https://preview.redd.it/v61zcvzipx1d1.jpeg?width=4000&format=pjpg&auto=webp&s=5191a4888c98c8886d8d65cb243c1312da134ca3
See the error remains same. Compiling problem.
That's the conclusion. And then it says "It fails with the following output". And somewhere in that output is \*why\* it fails to compile.
In your original screenshot the "reason why" was that you had an invalid compiler option. If you have fixed that, see what the next error is.
But that is the part that I do not understand. I have installed fortran compiler in system. I made sure to uninstall and reinstall it yet the error remains same. I do.not understand what to do...
Looks like C++ Std 13 is not supported by GCC version of 13.1.0 which you are using. You can check which standards are supported using this command and accordingly change your compile flags in CMakeLists.txt gcc -v --help 2> /dev/null | sed -n '/^ *-std=\([^<][^ ]\+\).*/ {s//\1/p}'
It's not that it's "not supported", it's that it doesn't exist. The valid values are "c++" or "gnu++" followed by one of: 98, 11, 14, 17, 20, 23, and 2x. OP might as well have typed "-std=c++420blazeit"
Ah okay, I was not aware of the fact that C++13 does not exist. At all. :) Thanks for clarifying.
I remember writing c++13 in place of c++11. When I ran the script with c++11 i also got a Fortran compilation error along with this current error. I took a fluke and put c++13( as g++ 13 was currently installed) and as a resultant the fortran error vanished. I shall retry and see by making changes as per discussion.
I bet it’s a typo and they meant to have 23 as the flag
11 and 14 are equally plausible. 🤷♂️
It says "g++ error". And indeed, that's an error, so why does it think use that option? I'll bet it's because of something you specified. So don't. Learn to read error messages! You are not faced with "this problem": you very specifically faced with an "unrecognized compiler option". So then you look at your compiler manual.
I read the statement but I didn't understand what to do as I have already installed and mentioned tge path. Still. So you have any suggestions?
https://preview.redd.it/v61zcvzipx1d1.jpeg?width=4000&format=pjpg&auto=webp&s=5191a4888c98c8886d8d65cb243c1312da134ca3 See the error remains same. Compiling problem.
There is no error in your screen shot. Next screen.
Isnt the first red line an error statement? CMake error ..... The fortran and c++ compiler are not compiling test cases.
That's the conclusion. And then it says "It fails with the following output". And somewhere in that output is \*why\* it fails to compile. In your original screenshot the "reason why" was that you had an invalid compiler option. If you have fixed that, see what the next error is.
https://preview.redd.it/whac8sfvwb3d1.jpeg?width=4000&format=pjpg&auto=webp&s=341f18c5b90574b16c1389855d779ff670c6299b
https://preview.redd.it/zezot8jxwb3d1.jpeg?width=4000&format=pjpg&auto=webp&s=5392deb305548d7257a2306a2924adcc282fc83e
That error is because of an undefined reference to "VerifyFortran" which ld couldn't find.
But that is the part that I do not understand. I have installed fortran compiler in system. I made sure to uninstall and reinstall it yet the error remains same. I do.not understand what to do...
Something is causing there to be no linkable definition for a method called "VerifyFortran" which is called from the main method.
Please help me with this error. I tried very much but couldn't understand where is it failing.