|
Creating wrapper library (DLL) |
Undecember
Member #23,807
August 2023
|
Hi. I'm building a game with Allegro5, and I have a problem. And I got For test, I created an empty VS2022 DLL project, without changing anything except adding #include <allegro/allegro5.h> and I got the same error. My environment is Win11x64 and VS2022. |
Edgar Reynaldo
Major Reynaldo
May 2007
|
If you create a dynamic library (dll) that depends on allegro, you have to link allegro to it. Since you're making a dll, it should have a dllmain, created automatically by VS. If you want to make a static library, you don't have to link to allegro now, but you will when you link your library to your program later. I don't get any error about missing main when making a dll that depends on allegro but then I'm on MinGW-W64. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
torhu
Member #2,727
September 2002
|
Search for mainCRTStartup in the Allegro source, you might need to add a #define to disable that pragma when creating a DLL. |
|