Open JayFoxRox opened 3 years ago
This will be caused by this:
which controls this:
I think that disabling cout
is pointless, if there are also cerr
and clog
, which also go nowhere.
The nxdk libc also provides stdout
(and stdin
), so I don't think there's a good reason to disable it in C++.
With stdout
/ cout
we can probably just ignore it. For stdin
/ cin
we'll need a better solution probably.
nxdk will probably need a way to hook up virtual file descriptors for pdclib to handle this properly. I assume it's possible to register a virtual filesystem through the kernel? If that works, we could optionally connect stdout / stdin to debuggers via network (or similar).
Edit: Here are some links in how this works on Windows:
While getting rid of my old GitHub notifications I noticed that I had an issue with lack of
std::cout
in the past, which became a problem while porting some projects.This issue is basically a bug report for the workaround seen here: https://github.com/JayFoxRox/nxdk/tree/2c850026a565eea0435cb14370b0a9d8864cdd33/usr/share/nxdk/samples/ozz-animation (I also briefly looked at the independent issue with
#include <atomic>
/std::atomic_int allocation_count_
/allocation_count_.store(0)
/allocation_count_.load()
, which appears to have been a problem back then, but it seems to be compile fine on https://github.com/XboxDev/nxdk/commit/72485f402b7f2b486430af9236a26fdef5ef7bd7 / https://github.com/XboxDev/nxdk-libcxx/commit/c594e975f383418d98dbdf35a8f2fff4699a62fb. I did not try running it though)Not sure if we had discussed this in the past or if an issue already exists.