Let's Make An olc::PixelGameEngine Application using Code::Blocks on Windows

Поділитися
Вставка
  • Опубліковано 12 вер 2024
  • Let's Make An olc::PixelGameEngine Application with MinGW
    • Let's Make An olc::Pix...
    OneLoneCoder - olcPixelGameEngine
    github.com/One...
    -Download olcPixelGameEngine.h header file
    -Download olcExampleProgram.cpp source file
    Code::Blocks
    www.codeblocks....

КОМЕНТАРІ • 30

  • @moros1138
    @moros1138  4 роки тому +2

    THIS TUTORIAL EXPECTS that you have followed my previous tutorial and have installed the proper version of MinGW.
    If you are encountering problems, trying running "g++ -v" from a command prompt and check that you are using MinGW from MSYS2.. If you are not, you are using the wrong version of MinGW and it is likely the reason you are encountering problems.
    ua-cam.com/video/jnI1gMxtrB4/v-deo.html

  • @javidx9
    @javidx9 4 роки тому +26

    I'm javidx9 and I approve of this message XD

  • @vaneurom7263
    @vaneurom7263 3 роки тому

    It worked perfectly first time for me by following closely your instructions. The two videos on the subject are very clear and enjoyable. Thank you for your work!

  • @fernandojoserojasestebez115
    @fernandojoserojasestebez115 3 роки тому +2

    HaHaHa, first not compiled and next watching the second tutorial about MinGW and now works perfectly.

    • @moros1138
      @moros1138  3 роки тому

      glad you got it working in the end.

  • @rishitsingh6621
    @rishitsingh6621 4 роки тому

    nice tutorial, Moros. Btw I'm Coderish

  • @ZennyKravitz
    @ZennyKravitz 3 роки тому

    Very interesting indeed

  • @TheFinagle
    @TheFinagle 3 роки тому +1

    I wish I knew this was here when I started with OLC::PGE a few months ago. I had no problem with the gcc that shipped with my OS, but setting the flags right and CB looking for .o files that it never generated (still happens with release, but debug works) because Im not using linker files. (I knew it was a strictly a CB issue because it all worked in terminal fine).

    • @moros1138
      @moros1138  2 роки тому

      I"m not sure what the issue is you're experiencing, but I'm glad the video helped getting you closer!

    • @TheFinagle
      @TheFinagle 2 роки тому +1

      @@moros1138 The specific issue I had was with how codeblocks handles compiling. It assumes (strongly) that everyone is using linker files. But I was compiling direct from .cpp to exe. When the second command tries to execute on the .o files it fails because there are no .o files - it then cleans up after itself deleting the executable that had generated.
      I did eventually figure it out

    • @moros1138
      @moros1138  2 роки тому

      @@TheFinagle I'm glad you got it all sorted!

  • @solrainer7
    @solrainer7 2 роки тому

    Little remark. If you use cygwin packet manager instead of mingw you must manualy #define __WIN32 and __#define__ __MINGW32__ right before #include "olcPixelGameEngine.h", otherwise there's apear some errors.

    • @moros1138
      @moros1138  2 роки тому

      cygwin is beyond the scope of these instructions, if I ever make a cygwin specific tutorial I'll be sure to include this tidbit of info. Thanks!

  • @edwinmartens7459
    @edwinmartens7459 3 роки тому

    I'm trying it on windows with code::blocks.. but I get a compile error on fs_path.h line 237 stating: no match for 'operator!=' .......
    On linux everyting works, exept for the sound extension, which gives me compile errors too..
    Can you help in any way ?

    • @moros1138
      @moros1138  3 роки тому

      I would suggest coming to the OLC discord server to discuss this in more detail. based on the vague error you gave me, it might be a problem involving the version of C++ being used. if you followed the tutorial i set it to use C++17 which PixelGameEngine currently requires.
      Anyways, you can find the discord server here:
      discordapp.com/invite/WhwHUMV

  • @larsh943
    @larsh943 4 роки тому

    Do you know if there is a way to use the pixel game engine with visual studio code? I can't get it to run.

    • @moros1138
      @moros1138  4 роки тому +1

      There is most definitely a way to do it! I use Visual Studio Code religiously. But the method will be slightly different depending on what OS and compiler you're using.
      I just made a gist with a couple scenarios. Build tasks.json examples for GCC on Linux and MinGW on Windows.
      gist.github.com/Moros1138/517fae660164587053d97c8b5dc59d03

    • @larsh943
      @larsh943 4 роки тому

      @@moros1138 Wow thanks so much! I still have one problem tho, i copied the tasks.json and added it to my project but when i try to run it i get the error: file format is not recognized; treating as linker script. do you maybe know why?

    • @moros1138
      @moros1138  4 роки тому

      I haven't the slightest idea without the details of your build environment. What compiler are you using? What OS?
      Also, if you're so inclined, you might consider joining the OneLoneCoder discord server.
      discord.gg/WhwHUMV

    • @larsh943
      @larsh943 4 роки тому

      @@moros1138 sorry, i'm using windows and MinGW. oops that error was because i hit ctrl+shift+b while on the tasks.son tab. I've tried it on olcExampleProgram.cpp but now i get a whole bunch of errors that don't make any sense. too much errors for the terminal window to show, even when scrolling all the way up.

    • @moros1138
      @moros1138  4 роки тому +1

      @@larsh943 just wanted to follow up here, so people coming here don't think I just left you hanging!... we solved the issue via discord. The problem ultimately was having multiple versions of MinGW installed and in the system path. We got it sorted out!

  • @humzauddin6692
    @humzauddin6692 4 роки тому

    Hello Bro,
    fatal error: experimental/filesystem: No such file or directory
    I am getting this error
    at line 243 [code]#include [/code]

    • @moros1138
      @moros1138  4 роки тому

      check my pinned comment.
      typically those who are having problems have not installed or configured the proper version of mingw... run "g++ - v" and check that you are using MSYS2 version of mingw. if it does not say MSYS2 in the output of that command, then you should follow my tutorial on installing MSYS2.

    • @humzauddin6692
      @humzauddin6692 4 роки тому

      @@moros1138 Thank you I think I haven't installed msys2 version

    • @moros1138
      @moros1138  4 роки тому

      @@humzauddin6692 no problem.. when you do.. make sure you remove the other version from your system path, to make sure you actually use the correct version!
      I have a video with a tutorial in my pinned comment :)

    • @humzauddin6692
      @humzauddin6692 4 роки тому

      @@moros1138 I seem to be missing std=c++ 17 on my CodeBlock, I think it is the reason it is not working properly do you know how can I add it to my system?
      Also, I don't understand. Whose version should I manual remove from my system path? I haven't linked anything to the system path. I have used to the 64bit version that's compatible with my system.

    • @moonbatch-team9684
      @moonbatch-team9684 3 роки тому

      @@humzauddin6692 yes you need to add in linker path -std=c++17 or c++2a