Closed DebadityaPal closed 3 years ago
I would like to work on this issue
Assigned. Feel free to contact either of us if you need some help.
I can't seem to get the program to even compile even though I have gcc version 11.1.0. So could I be provided with an example command that is guaranteed to run without throwing any errors ?
EDIT -
Send the error traceback. It makes it easier for us to figure out the error.
Also did you set the C++17 flag, like this?
gcc -std=C++17 compressor.cpp <args>
I've edited my previous comment, do check it out.
Tagging @hs2361 for visibility. @XDRAGON2002, try using g++ -std=c++17 compressor.cpp -o compressor
. There is a documentation error indeed, if you want you can update it in the docs as well, otherwise, I'll do it. Feel free to raise an issue.
@DebadityaPal yes the updated command works as expected, I'll be sure to raise and fix the documentation issue once I'm finished with this issue. Also just for the sake of it, any idea why the gcc compiler might behave this way ? Not being able to link files ?
So the gcc compiler is basically a simplified version of the g++ compiler.
In simple terms:
g++
= gcc -xc++ -lstdc++ -shared-libgcc
where the first arg is a compiler and the other 2 are linkers.
Check out this Stackoverflow Question for a much more detailed answer
Oh okay that explains a lot. Thanks for the quick response though !
Also created #8 regarding the documentation fix.
No problem, but unfortunately I can't add that issue to the hacktoberfest topic as it is a very small issue. I'm afraid their reviewers would mark it as spam. But it would count towards the Git Init FOSS leaderboard though.
Sure, it's okay.
Opened PR #9 fixing this issue.
The bits/stdc++.h header file used is a nonstandard header file that might not work with non-GNU compilers like Clang. Hence, we should get rid of it. Try to import the header dependencies individually and remove all instances of bits/stdc++.h