In file included from olcExampleProgram.cpp:2:0: olcPixelGameEngine.h:387:36: fatal error: experimental/filesystem: No such file or directory #include :/ please advice
generally speaking, when you encounter problems like this it's because you're trying to use the wrong version of mingw on windows. the easiest way to tell whether or not you're using the right version is to type in "g++ -v" and see if it says MSYS Build, or words to that effect in the output. If it does not, there are a couple possible reasons. First, you may have installed multiple versions of mingw, and there is conflicting gcc/g++/mingw32-make et al. in your PATH.... that would be the first place I would check because the other possible reasons involve not actually following the instructions of the video (and I don't wanna say that, so don't make me say that) you can join the OLC discord if you need more help. discord.gg/WhwHUMV
in retrospect, probably not, best to leave it mingw32-make, and call that. when i made this video i didn't consider path contamination and the idea of installing multiple toolchains
Update: I fixed it. All I had to do, was to launch MSYS as administrator. Sigh. Why does programming have to be this stupid sometimes? ///////////////////////////////////////////////////////////////////////////////////////////// I got to step 2 and once I type 'pacman -Syu' the following appears in the MSYS window: :: Synchronizing package databases... error: failed to update mingw32 (unable to lock database) error: failed to update mingw64 (unable to lock database) error: failed to update msys (unable to lock database) error: failed to synchronize all databases After that I tried out all the other commands listed in the description and it only says the following: error: failed to init transaction (unable to lock database) error: could not lock database: Permission denied What do? Please halp. I'm on Windows 10, 64bit, have reinstalled MSYS and restarted the computer but nothing helps.
Programming is like sailing. You have your own experience yet despite best efforts and perhaps never even doing anything wrong, you are at the mercy of the ocean. Anyways, I'm glad you got it sorted.
@@moros1138 I thought the aim of programming was to reduce the chaos of the ocean. Well, looks like we've created so much control structures of our own that we unintentionally built our very own sea with its very own kind of chaos. Anyway, happy coding and good night.
good catch! i was waiting for someone to notice that. I daily drive linux, therefore all my windows based stuff is in a VM and at the time my VM didn't support proper hardware acceleration, which left the PGE window as a blank white screen. To make the video, I did a jump cut with the linux window in front to "fake" it :)
It's not a trivial thing to sort out what issues might arise from having the wrong version of mingw installed. However if you were lucky enough to have installed a compatible version, then ensure that it's in your path and then the same commands should work... Also read the description for updated commands as this tutorial is relatively old at this point.
this seems like the kind of error you get when you are using a bad version of mingw. run the command g++ -v and see if it says MSYS2 anywhere in the resulting output. if not. you have another version of mingw that doesn't support modern C++ features.
@@moros1138 Yes I've installed wingw based on your recommendation and all that, Ive tried all the things that you mentioned in this video and the other video, Unfortunately it has error too, but I forgot what it was (on the second attempt) I don't know what's wrong Uninstall it already
@@footballCartoon91 if you decide to give it a go in the future, make sure you run the command g++ - v to ensure you are using the msys version. Usually it has to do with multiple versions of mingw installed and in the system path. Good luck.
This seems like a very nice video, unfortunately it does not come with a gdb.exe file. Thus, I can't debug in VSCode. Sadly, I have to look for yet another different compiler.
if you wanted gdb you could have installed it's msys2 package. i'm not sure what it's exactly called but searching the msys2 packages for "gdb" probably find it easy enough. Glad you liked the video tho. :) Hope you found a solution that works for you.
@@moros1138 A solution I did find. Not in a straight-forward manner though. You see, I started to learn C++ about half a year ago, in VSCode. I had built half a dozen programs in it and even managed to create two classes of my own. Then I decided, it would be nice to go beyond the console. I was already well aware of javidx9 and when I learnt about his PGE I thought it was an excellent way of expanding my programming knowledge. Unfortunately, my knowledge about toolchains is equal to zero, so I spent days hopelessly trying to get it to work in VSCode (which also lead me to this video). In the end I went to the PGE GitHub and asked the community, what I should do. And so our lord and saviour javid descended onto the realm of the mortals and told me: "Lol, just use Visual Studio, n00b." Since I had tried everything and nothing seemed to work, I tried it out. That's where I first learnt about the difference between Code Editors and IDEs. I have since then completely switched to VS and am happily working on additional algorithm implementations and various game projects. Despite VSCode bein unfit for me, I had learnt a great deal from using it. For instance, now I have a basic understanding of compilers, assemblers and linkers and am not completely dead in the water when someone talks about them. Aight, thanks for reading my novel, have a good night.
Awesome work, great tone, good pace.
This is one of the most helpful foundational videos for installing a vendor-agnostic C++ setup I have ever seen. Thank you!!!
cant thank you enough for this. I have been losing my mind trying to find answers as a beginner, turns out I was using an old version of mingw.
Thank you for both videos.
In version 2.07 of olcPixelGameEngine you also need to add Dwmapi lib (-lDwmapi).
Thank you so much. I've been using my school's linux server for most cpp dev, so I really needed some help setting it up in windows.
Glad it was helpful!
You are a savior! I'm starting to hate MinGW with all my heart!
Yea, If it's possible for you. I recommend using Visual Studio Community. It's free and is generally much better for windows development.
Thank you a lot !
You save me a lot of time, and I was struggling a lot.
I'll also credit you in my project. Thanks again, cheers !
You are very welcome!
Thanks to this video guide, now understand the usefulness of MSYS2.
Thank you Moros for making this
👏🏾
You're very welcome. I'm glad you found it useful!
Wow.. Nice tutorial... Very easy one to follow.. Why did you stop making tutorials... Please continue...
Thanks! and I will, but I'm slow, lol
Thank you sir!
You are welcome!
Thank's very much for this video! Stay safe. :)
Thanks, you too!
Great work! Thank you so much.
Thank you sir.
thank you so much!!!
In file included from olcExampleProgram.cpp:2:0:
olcPixelGameEngine.h:387:36: fatal error: experimental/filesystem: No such file or directory
#include
:/ please advice
generally speaking, when you encounter problems like this it's because you're trying to use the wrong version of mingw on windows. the easiest way to tell whether or not you're using the right version is to type in "g++ -v" and see if it says MSYS Build, or words to that effect in the output.
If it does not, there are a couple possible reasons. First, you may have installed multiple versions of mingw, and there is conflicting gcc/g++/mingw32-make et al. in your PATH.... that would be the first place I would check because the other possible reasons involve not actually following the instructions of the video (and I don't wanna say that, so don't make me say that)
you can join the OLC discord if you need more help.
discord.gg/WhwHUMV
Is it a good idea to add MAKE to our system_path as well?
in retrospect, probably not, best to leave it mingw32-make, and call that. when i made this video i didn't consider path contamination and the idea of installing multiple toolchains
Update: I fixed it. All I had to do, was to launch MSYS as administrator.
Sigh.
Why does programming have to be this stupid sometimes?
/////////////////////////////////////////////////////////////////////////////////////////////
I got to step 2 and once I type 'pacman -Syu' the following appears in the MSYS window:
:: Synchronizing package databases...
error: failed to update mingw32 (unable to lock database)
error: failed to update mingw64 (unable to lock database)
error: failed to update msys (unable to lock database)
error: failed to synchronize all databases
After that I tried out all the other commands listed in the description and it only says the following:
error: failed to init transaction (unable to lock database)
error: could not lock database: Permission denied
What do? Please halp.
I'm on Windows 10, 64bit, have reinstalled MSYS and restarted the computer but nothing helps.
Programming is like sailing. You have your own experience yet despite best efforts and perhaps never even doing anything wrong, you are at the mercy of the ocean.
Anyways, I'm glad you got it sorted.
@@moros1138 I thought the aim of programming was to reduce the chaos of the ocean.
Well, looks like we've created so much control structures of our own that we unintentionally built our very own sea with its very own kind of chaos.
Anyway, happy coding and good night.
i followed all the steps, but when I run the program it only shows a white screen instead of noise, what should i do?
Sounds like you're running it in a VM without graphics acceleration enabled, but without further details I can't really be helpful to you.
waaaait, how did you run the example program from within windows and it opened from within your linux desktop 7:12
good catch! i was waiting for someone to notice that. I daily drive linux, therefore all my windows based stuff is in a VM and at the time my VM didn't support proper hardware acceleration, which left the PGE window as a blank white screen.
To make the video, I did a jump cut with the linux window in front to "fake" it :)
what if you already have mingw installed?
It's not a trivial thing to sort out what issues might arise from having the wrong version of mingw installed. However if you were lucky enough to have installed a compatible version, then ensure that it's in your path and then the same commands should work... Also read the description for updated commands as this tutorial is relatively old at this point.
works in cmd but not in codeblocks
There is a separate video for this
I got an error:
At line 237
"no match for 'operator!=' (operand types are 'std:: filesystem::__cxxll::path' and 'std:: filesystem::__cxxll::path')
this seems like the kind of error you get when you are using a bad version of mingw.
run the command
g++ -v
and see if it says MSYS2 anywhere in the resulting output. if not. you have another version of mingw that doesn't support modern C++ features.
@@moros1138
Yes I've installed wingw based on your recommendation and all that,
Ive tried all the things that you mentioned in this video and the other video,
Unfortunately it has error too, but I forgot what it was (on the second attempt)
I don't know what's wrong
Uninstall it already
@@footballCartoon91 if you decide to give it a go in the future, make sure you run the command
g++ - v
to ensure you are using the msys version. Usually it has to do with multiple versions of mingw installed and in the system path. Good luck.
This seems like a very nice video, unfortunately it does not come with a gdb.exe file. Thus, I can't debug in VSCode. Sadly, I have to look for yet another different compiler.
if you wanted gdb you could have installed it's msys2 package. i'm not sure what it's exactly called but searching the msys2 packages for "gdb" probably find it easy enough.
Glad you liked the video tho. :) Hope you found a solution that works for you.
@@moros1138 A solution I did find. Not in a straight-forward manner though. You see, I started to learn C++ about half a year ago, in VSCode. I had built half a dozen programs in it and even managed to create two classes of my own. Then I decided, it would be nice to go beyond the console. I was already well aware of javidx9 and when I learnt about his PGE I thought it was an excellent way of expanding my programming knowledge. Unfortunately, my knowledge about toolchains is equal to zero, so I spent days hopelessly trying to get it to work in VSCode (which also lead me to this video). In the end I went to the PGE GitHub and asked the community, what I should do. And so our lord and saviour javid descended onto the realm of the mortals and told me: "Lol, just use Visual Studio, n00b."
Since I had tried everything and nothing seemed to work, I tried it out. That's where I first learnt about the difference between Code Editors and IDEs. I have since then completely switched to VS and am happily working on additional algorithm implementations and various game projects. Despite VSCode bein unfit for me, I had learnt a great deal from using it. For instance, now I have a basic understanding of compilers, assemblers and linkers and am not completely dead in the water when someone talks about them.
Aight, thanks for reading my novel, have a good night.
If only MSYS64 didn't give errors - bash: xxxx command not found
Only thing that works is "ls /usr/bin/"
this sounds, to me, like you've installed the main package without installing the mingw compiler, both I cover in detail in this tutorial.