Closed w43322 closed 1 year ago
Since we are emulating the LeetCode OJ, I think we should ship the bits/stdc++.h
for macOS version. Like this one: https://github.com/tekfyl/bits-stdc-.h-for-mac/blob/master/stdc%2B%2B.h
I agree. Should I make a separate PR or should I include it in #137 ?
It's better to create a separate PR.
We can use this command to fetch the latest stdc++.h
directly from gcc's source repo:
git archive --remote=git://gcc.gnu.org/git/gcc.git HEAD libstdc++-v3/include/precompiled/stdc++.h | tar -xO
One question, if we include this file in our repo, do we have to change our license to GPL…
What if we run this command on the user's machine?
What if we run this command on the user's machine?
I don't think we should do this automatically. Instead, we should add some instructions to our manual and let the users handle it themselves. Alternatively, we can simply have Mac users run brew install gcc
:)
Verify steps
Description
bits/stdc++.h
is a gnu/gcc extension, which is not present in macOS/clang.https://stackoverflow.com/questions/28994148/how-can-i-include-bits-stdc-in-xcode
Should we fix this rather than letting the users fix this for themselves?
Possible Solution