質問: -1 ){ return -1 ; } DrawPixel( 320 , 240 , GetColor( 255,255,255 ) ) ; WaitKey() ; DxLib_End() ; return 0 ; } ``` ### Makefile ``` INCLUDEDIR=E:/DX/dxlib LIBS1=-lDxLib -lDxUseCLib -lDxDrawFunc LIBS2=-ljpeg -lpng -lzlib -ltiff -ltheora_static -lvorbis_static -lvorbisfile_static -logg_static -lbulletdynamics -lbulletcollision -lbulletmath -lopusfile -lopus -lsilk_common -lcelt LINKDIR= -L dxlib CC=g++ CFLAGS= CPPFLAGS= -I $(INCLUDEDIR) -DDX_GCC_COMPILE -DDX_NON_INLINE_ASM LDFLAGS=-mwindows $(LINKDIR) $(LIBS1) $(LIBS2) main:main.o ```
回答: MSYS2にて 6_3_0_i586フォルダをdxlibフォルダにして mingw32から `g++ main.cpp -Ldxlib -lDxLib -lDxUseCLib -lDxDrawFunc -ljpeg -lpng -lzlib -ltiff -ltheora_static -lvorbis_static -lvorbisfile_static -logg_static -lbulletdynamics -lbulletcollision -lbulletmath -lopusfile -lopus -lsilk_common -lcelt -mwindows` でコンパイル及び実行できました。 > > 文字コードはShiftJISです。 > > > gccはutf-8が基本だった筈...asciiのみならutf-8と変わらないけど g++ -vの結果を貼っておくと ``` Using built-in specs. COLLECT_GCC=C:\msys64\mingw32\bin\g++.exe COLLECT_LTO_WRAPPER=C:/msys64/mingw32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: ../gcc-7.3.0/configure --prefix=/mingw32 --with-local-prefix=/mingw32/local --build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=i686-w64-mingw32 --with-native-system-header-dir=/mingw32/i686-w64-mingw32/include --libexecdir=/mingw32/lib --enable-bootstrap --with-arch=i686 --with-tune=generic --enable-languages=c,lto,c++,objc,obj-c++,fortran,ada --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-time=yes --enable-libstdcxx-filesystem-ts=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --with-libiconv --with-system-zlib --with-gmp=/mingw32 --with-mpfr=/mingw32 --with-mpc=/mingw32 --with-isl=/mingw32 --with-pkgversion='Rev1, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld --disable-sjlj-exceptions --with-dwarf2 Thread model: posix gcc version 7.3.0 (Rev1, Built by MSYS2 project) ```