Closed DarkKnight2000 closed 2 years ago
No worries @DarkKnight2000, it's a common issue with non-VS, Windows executables you have there.
Basically, Windows requires extra steps to pipe output to the parent process and can be added to this project as so:
#include <raylib-cpp.hpp>
#include <windows.h>
int main() {
// Attach Windows console
AttachConsole(ATTACH_PARENT_PROCESS);
freopen("CON", "w", stdout);
freopen("CON", "w", stderr);
freopen("CON", "r", stdin);
// the rest of your main function....
}
You can see a previous thread about it here https://github.com/CapsCollective/vulkan-cpp-starter/issues/5. I hope this resolves the issue for you!
Hey, Thanks for the reply, that works like a charm!! I had to write typedef struct tagMSG *LPMSG;
before #include <windows.h>
and its compiling! Thanks!
Hey! Thanks for the great starter project. I was able to run
make setup
andmake
without any problems. But after running the app, I couldn't see any print statements ( the extra info that raylib prints ). Even if I writecout <<
they are not printed.I am on Windows 10 and cloned the repo just a few hours back. I am building raylib in DEBUG mode and added an extra flag to not compile Raylib audio ( Some conflicts with windows.h at CloseWindow() ) so added these flags on line 77. These are the only changes I did.
I think I am missing some small thing here but can't figure out what. Any help is appreciated, Thanks!