* * *

Author Topic: Allegro.pas  (Read 7987 times)

dubst3pp4

  • Jr. Member
  • **
  • Posts: 59
  • Retro computing ~ GNU/Linux
    • me on Mastodon
Re: Allegro.pas
« Reply #15 on: November 08, 2018, 07:31:19 am »
Hi Ñuño_Martínez, thanks for your great work!

I'm testing the Allegro.pas bindings for a new project and figured out, that the latest sources (allegro.pas-5.2.b.0) don't build on Linux, whereas allegro.pas-5.2.a.3 builds fine. I've installed allegro 5.2.3.0 from the Ubuntu repositories. After I type make the linker tells me the following:
Quote
Allegro.pas 5.2.b
(c) Guillermo Martínez J. 2006-2017
http://allegro-pas.sourceforge.net

fpc -O- -gl -vh -vw -dDEBUGMODE -Sh -Si  -Fulib/ -FUobj/ examples/ex_bitmap_flip.pas -obin/examples/ex_bitmap_flip
Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 3.0.4 [2017/12/13] for x86_64
Copyright (c) 1993-2017 by Florian Klaempfl and others
Target OS: Linux for x86-64
Compiling examples/ex_bitmap_flip.pas
Linking bin/examples/ex_bitmap_flip
/usr/bin/ld: warning: bin/examples/link.res contains output sections; did you forget -T?
/usr/bin/ld: -lallegro-debug was not found
/usr/bin/ld: -lallegro_image-debug was not found
/usr/bin/ld: -lallegro_font-debug was not found
/usr/bin/ld: -lallegro_dialog-debug was not found
Error: Error while linking
Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /usr/bin/ppcx64 returned an error exitcode
makefile.all:20: recipe for target 'bin/examples/ex_bitmap_flip' failed
make: *** [bin/examples/ex_bitmap_flip] Error 1
It seems that the allegro_*-debug files weren't referenced with the previous version of allegro.pas, weren't they? Do I miss something important when I use allegro.pas-5.2.a.3?

Thanks for any hints :-)
« Last Edit: November 09, 2018, 10:25:46 am by dubst3pp4 »

Soner

  • Full Member
  • ***
  • Posts: 101
Re: Allegro.pas
« Reply #16 on: November 08, 2018, 03:53:11 pm »
You must install allegro development package.
Install synaptic package program and search with it.
It has same name plus...-dev...


Look at this lines from compile result:

usr/bin/ld: -lallegro-debug was not found
/usr/bin/ld: -lallegro_image-debug was not found
/usr/bin/ld: -lallegro_font-debug was not found
/usr/bin/ld: -lallegro_dialog-debug was not found



Linker tells to you that some libs are missing.
Look for the name -lxxxxx in synaptic.
I.e for -lallegro_image is something like liballegro_image...-dev

dubst3pp4

  • Jr. Member
  • **
  • Posts: 59
  • Retro computing ~ GNU/Linux
    • me on Mastodon
Re: Allegro.pas
« Reply #17 on: November 08, 2018, 04:00:54 pm »
You must install allegro development package.
Install synaptic package program and search with it.
It has same name plus...-dev...
I've installed them already, that's why I was able to build the examples with 5.2.a.3 but not with the latest version (5.2.b.0).

Soner

  • Full Member
  • ***
  • Posts: 101
Re: Allegro.pas
« Reply #18 on: November 08, 2018, 04:24:09 pm »
The linker tells you have not installed them. Maybe your program is 32 bit and your allegro 64bit,or lib names are changed in allegro.pas 5.2.b.0.
I would compare library names in both versions.
Good luck.

dubst3pp4

  • Jr. Member
  • **
  • Posts: 59
  • Retro computing ~ GNU/Linux
    • me on Mastodon
Re: Allegro.pas
« Reply #19 on: November 09, 2018, 08:21:36 am »
Hi Soner,
thanks for your input. I found out that it was no problem to compile the demo game by Handoko, which is included in the latest allegro.pas. So the problem had to be in the makefile and voilà, in the file there are the following lines:

Code: [Select]
# Optimized compilation
# FLAGS = $(OPTOPT) $(PFLAGS) $(EFLAGS)
# Use next line instead to activate debug.
FLAGS = $(DBGOPT) $(PFLAGS) $(EFLAGS)

which I changed to

Code: [Select]
# Optimized compilation
FLAGS = $(OPTOPT) $(PFLAGS) $(EFLAGS)
# Use next line instead to activate debug.
# FLAGS = $(DBGOPT) $(PFLAGS) $(EFLAGS)

and now all the examples compile fine. Neither on Ubuntu nor on Fedora there are *-debug versions of allegro5, just the -dev packages.
« Last Edit: November 09, 2018, 10:25:25 am by dubst3pp4 »

Ñuño_Martínez

  • Hero Member
  • *****
  • Posts: 821
    • Burdjia
Re: Allegro.pas
« Reply #20 on: November 09, 2018, 06:21:49 pm »
That's weird.  I can compile it in my Linux system (Xubuntu 16.04, should upgrade and test  %)).  May be they changed something in the names, but I don't think so.  Or am I using a different version?  I'll take a look and update if needed. Thanks dubst3pp4.

BTW I'm working in the documentation (slowly because I don't have a lot of free time, and also I want to do something for GitHub Game Off) checking the whole library line per line comparing with the original Allegro.  This is also to find potential (API) bugs and also to know what stuff are not implemented yet.

[Edit]
I've created a bug ticket just to keep track and not forget it.
« Last Edit: November 09, 2018, 06:29:33 pm by Ñuño_Martínez »
Are you interested in game programming? Join the Pascal Game Development community!
Also visit the Game Development Portal

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus