最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

allegro5 - How to set up Allegro 5 in Code::Blocks using MinGW-W64 GCC 14.2.0? - Stack Overflow

programmeradmin0浏览0评论

I'm trying to set up Allegro 5 in Code::Blocks using MinGW-W64 (GCC 14.2.0 POSIX-SEH).

I downloaded the prebuilt Allegro 5 binaries from the official release and used the file allegro-x86_64-w64-mingw32-gcc-14.2.0-posix-seh-static-5.2.10.0.zip. To match this, I downloaded the corresponding MinGW-W64 GCC 14.2.0 from WinLibs in the file winlibs-x86_64-posix-seh-gcc-14.2.0-mingw-w64msvcrt-12.0.0-r2.7z.

I extracted both archives into separate folders and configured Code::Blocks to use MinGW as the compiler. I added the include paths for Allegro and the library directories. In the linker settings, I added all necessary libraries, including Allegro, JPEG, PNG, ZLIB, WebP, Vorbis, OpenGL, Windows API, and others.

When I try to compile a simple program, Code::Blocks generates a lot of errors. At first, the compiler couldn't find some libraries like libwebp, libpng16, or libzlib. After adding these files, I started getting linker errors with undefined references. The first ones were undefined reference to SharpYuvInit, SharpYuvGetConversionMatrix, and SharpYuvConvert. I checked libwebp.a, but it seems it does not contain these functions. I also tried installing libwebp using MSYS2, but I couldn't find libsharpuv.a there. After fixing some of these issues, new errors appeared related to OpenGL and system libraries, such as undefined reference to wglGetProcAddress, wglMakeCurrent, and CoInitialize. Every time I fix one issue, more errors show up, making it impossible to get a working configuration. How can I properly set up Allegro 5 in Code::Blocks with MinGW-W64 to avoid all these errors? Do I need to compile the missing libraries myself, or is there a working prebuilt version?

发布评论

评论列表(0)

  1. 暂无评论