Author Topic: Allegro 32bit  (Read 125 times)

0 Members and 1 Guest are viewing this topic.

Offline Forestidia86

  • Posts: 658
  • inactive
    • View Profile
Allegro 32bit
« on: June 03, 2021, 06:53:13 PM »
Still very speculative:

It is possible that OPTLINK (32bit Linker for dmd) doesn't like the MVS Nuget .libs and lld-link (ldc-linker) doesn't like the from the mingw github DLLS via implib created .libs of Allegro 32bit.

Further remarks:
Caveat for the by DAllegro github provided create_import_libs.bat: It will create from an allegro_xxx-debug-5.2.dll an allegro_xxx.lib.
This is good if you want to use debugging libraries. But if you don't want them but just regular libraries, be sure to have no allegro_xxx-debug-5.2.dll in the directory where you use the batch file since your non-debugging .libs will likely be overridden by debugging .libs.

The debugging libraries (allegro_xxx-debug-5.2.dlls) create an allegro.log when the app runs and need further mingw dependencies.
« Last Edit: June 04, 2021, 03:07:02 PM by Forestidia86 »

Offline Simon

  • Administrator
  • Posts: 3114
    • View Profile
    • Lix
Re: Allegro 32bit
« Reply #1 on: June 03, 2021, 07:58:09 PM »
Thanks for the investigation.

I'd like to support Windows 32-bit and 64-bit builds, both with DMD and LDC. If I have to offer 3 or 4 convenience archives with Allegro/enet .lib/.dlls, so be it. It's good to have the other compiler as fallback.

-- Simon

Offline Forestidia86

  • Posts: 658
  • inactive
    • View Profile
Re: Allegro 32bit
« Reply #2 on: June 03, 2021, 09:54:55 PM »
Still very speculative:

It is possible that OPTLINK (32bit Linker for dmd) doesn't like the MVS Nuget .libs and lld-link (ldc-linker) doesn't like the from the mingw github DLLS via implib created .libs of Allegro 32bit.

It seems that the Nuget .libs are actually .a files (ar archives) that could confuse rather old OPTLINK.

Edit:

Needs to be retested:
The mingw archive has an lib folder with .dll.a-files. If you rename the necessary ones to .lib, ldc 1.24 has a problem with sehsafe since the provided build uses the dwarf exception handler. You can turn sehsafe off by adding the linkerflag '-sehsafe:no' and then it builds/links.
The via implib from the dll created .libs don't seem to work with ldc.
« Last Edit: June 04, 2021, 03:06:40 PM by Forestidia86 »