いつもVSで使わせてもらってます。
MinGWを使ってみようと思ったのですがg++でリンクする際にエラーが出て困ってます。
ライブラリは「プロジェクトに追加すべきファイル_GCC(MinGW)用\5_3_0_i686」の中身をdxlibフォルダに入れて使ってます。
ソースコードはttp://dxlib.o.oo7.jp/use/dxuse_gcc.htmlをコピペさせてもらいました。
間違っているところがあったら教えてください。
環境
OS : win10
g++: ver 5.3.0
g++ -Wl,"--no-as-needed" -mwindows -Idxlib -Ldxlib \
-DDX_GCC_COMPILE \
-DDX_NON_INLINE_ASM \
-lDxLib \
-lDxUseCLib \
-lDxDrawFunc \
-ljpeg \
-lpng \
-lzlib \
-ltiff \
-ltheora_static \
-lvorbis_static \
-lvorbisfile_static \
-logg_static \
-lbulletdynamics \
-lbulletcollision \
-lbulletmath \
-lopusfile \
-lopus \
-lsilk_common \
-lcelt \
test.cpp
C:\Users\セ\AppData\Local\Temp\ccjYmof0.o:test.cpp:(.text+0x7): undefined reference to `DxLib::DxLib_Init()'
C:\Users\セ\AppData\Local\Temp\ccjYmof0.o:test.cpp:(.text+0x34): undefined reference to `DxLib::GetColor(int, int, int)'
C:\Users\セ\AppData\Local\Temp\ccjYmof0.o:test.cpp:(.text+0x4c): undefined reference to `DxLib::DrawPixel(int, int, unsigned int)'
C:\Users\セ\AppData\Local\Temp\ccjYmof0.o:test.cpp:(.text+0x51): undefined reference to `DxLib::WaitKey()'
C:\Users\セ\AppData\Local\Temp\ccjYmof0.o:test.cpp:(.text+0x56): undefined reference to `DxLib::DxLib_End()'
collect2.exe: error: ld returned 1 exit status
make: *** [default] エラー 1