Closed sngo666 closed 11 months ago
This isn't really a problem with building on Linux as much as it is a problem with building with g++ versions < 13. Removing std::ios::noreplace shouldn't cause any problems if you are only running Omega on a single user system. However, if you wanted many users to be able to play simultaneously, then you could encounter race conditions with multiple processes trying to write to the high score file simultaneously. std::ios::noreplace ensures that only one process can access the high score file at a time, and other processes will wait until the lock file is removed. Using fmt::format instead of std::format is a viable workaround when using g++ versions < 13, but I would prefer to avoid using third party libraries when they are not needed. What distro are you using that is still on gcc 11? I can do some research to determine the best way to obtain GCC 13 on that distro and include notes in the README for users wanting to build Omega on that distro.
I used gcc11.4, thank you for your reminder. I have compiled and installed gcc13. Thank you, time flies so fast that I am completely unaware of the need to update it!
in building I met three problems, and i think it would be better if you take a little time to fix. the newest g++-11 can't use new features
<format>
in c++20, and it's difficult to build by gcc. There is a symbolic function that uses macro definitions to support both long and int types, and it is obvious that neither the compiler nor I would like to see such a writing method.noreplace
inios
is not supported.i use
<fmt>
instead and rewrite the sign function. As i didn't know how to dual withnoreplace
, i finally deleted it :PIt may not seem to cause much trouble