前提・実現したいこと
DxLibをMinGWで使いたいと思い、ダウンロードして使おうとしたのですが、エラーらしきものが出てきてコンパイルできませんでした。
発生している問題・エラーメッセージ
c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: dxlib/libjpeg.a(jerror.o):jerror.c:(.text+0x197): undefined reference to '_imp____acrt_iob_func' c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: dxlib/libpng.a(pngerror.o):pngerror.c:(.text+0x303 ): undefined reference to '_imp____acrt_iob_func' c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: dxlib/libtiff.a(tif_win32.o):tif_win32.c:(.text+0x 347): undefined reference to '_imp____acrt_iob_func' c:/mingw/bin/../lib/gcc/mingw32/8.2.0/../../../../mingw32/bin/ld.exe: dxlib/libtiff.a(tif_win32.o):tif_win32.c:(.text+0x 3f7): undefined reference to '_imp____acrt_iob_func' collect2.exe: error: ld returned 1 exit status
該当のソースコード
C++
1#include "dxlib/DxLib.h" 2 3int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow){ 4 ChangeWindowMode(TRUE); 5 6 if(DxLib_Init()==-1){ 7 return -1; 8 } 9 10 WaitKey(); 11 12 DxLib_End(); 13 14 return 0; 15}
コンパイル(見易さのため改行を入れています)
g++ Main.cpp -DDX_GCC_COMPILE -DDX_NON_INLINE_ASM -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
試したこと
エラーメッセージについて調べてみたのですが、詳細な情報を得られませんでした。
補足情報(FW/ツールのバージョンなど)
MinGW 8.2.0
エラー自体はlibjpeg.aのコンパイル環境と自分のコンパイル環境が違うときにでてくるエラーっぽいですが、同じバージョンを使ってますか?