Closed dxkyy closed 1 year ago
please include more details.. OS, toolchain, toolchain version, etc..
Typically when we see filesystem related issues it's because you haven't set to compile with -std=c++17
in your build command.. if you're already doing that, or doing that doesn't help, we'll need more information.
I have the same error can you explain how to set to compile with -std=c++17
which compiler do you use?
I'm using gcc on visual studio code. Should I use an other one ?
In order to give useful assistance, you'll need to provide useful information.
run gcc -v
and post the output... what's your OS? other pertinent information, etc.
I'm using gcc 6.3.0 on Windows 10
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/6.3.0/lto-wrapper.exe
Target: mingw32
Configured with: ../src/gcc-6.3.0/configure --build=x86_64-pc-linux-gnu --host=mingw32 --target=mingw32 --with-gmp=/mingw --with-mpfr --with-mpc=/mingw --with-isl=/mingw --prefix=/mingw --disable-win32-registry --with-arch=i586 --with-tune=generic --enable-languages=c,c++,objc,obj-c++,fortran,ada --with-pkgversion='MinGW.org GCC-6.3.0-1' --enable-static --enable-shared --enable-threads --with-dwarf2 --disable-sjlj-exceptions --enable-version-specific-runtime-libs --with-libiconv-prefix=/mingw --with-libintl-prefix=/mingw --enable-libstdcxx-debug --enable-libgomp --disable-libvtv --enable-nls
Thread model: win32
gcc version 6.3.0 (MinGW.org GCC-6.3.0-1)
I also tried using -std=c++17
which didn't seem to work either.
You're using a bad version of MinGW.
posix
thread model, this version is using the win32
thread model.There's instructions to install the MSYS2 version which is among the most up-to-date MinGW/GCC on windows.
https://github.com/OneLoneCoder/olcPixelGameEngine/wiki/Compiling-on-Windows-with-Other-Compilers
Good luck.
I followed your tutorial and I'm now able to compile it, but now I'm getting this error when trying to compile my file:
src/olcPixelGameEngine.h: In static member function 'static LRESULT olc::Platform_Windows::olc_WindowEvent(HWND, UINT, WPARAM, LPARAM)':
src/olcPixelGameEngine.h:5577:70: error: 'dbuffer' was not declared in this scope; did you mean 'dfbuffer'?
5577 | vFiles.push_back(std::string(dbuffer));
| ^~~~~~~
| dfbuffer
That's because a tyoo made it into this latest version, i let javid know about it but in the meantime go into the header and fix the dbuffer
typo at line 5577, it should be dfbuffer
When I try to compile this file using gcc:
I get this error: