Allegro.cc - Online Community

Allegro.cc Forums » Allegro Development » Linker doesn't find Oklab & RGB Linear conversion functions

This thread is locked; no one can reply to it. rss feed Print
Linker doesn't find Oklab & RGB Linear conversion functions
Niunio
Member #1,975
March 2002
avatar

I know I'm the only one using Pascal here but I'll ask anyway:

Trying to port ex_color_gradient to Pascal the linker can't find Oklab nor linear functions (i.e. al_color_rgb_to_oklab and such). The weird thing is that C version compiles and runs without any problem. Also the Pascal linker is able to find CIELab and HVS
functions.

Of course, I've check my Allegro installation (version 5.2.8) and it is correct. Also I've read the sources to see if these functions have any sort of alias or something weird with parameters but everything looks right.

Any idea about what would be happening?

-----------------
Current projects: Allegro.pas | MinGRo

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Niunio
Member #1,975
March 2002
avatar

I don't think that's the answer. As I've said other color functions work (HSV and the CIElab). Maybe there's something in the functions signatures that I didn't care of. ???

-----------------
Current projects: Allegro.pas | MinGRo

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Niunio
Member #1,975
March 2002
avatar

I'm thinking, maybe there are some part of the add-on that is in the static part of the library (the .a file?). If so, that is the problem as Free Pascal and Delphi just load the DLL/so file.

-----------------
Current projects: Allegro.pas | MinGRo

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Niunio
Member #1,975
March 2002
avatar

Are they inline? I still think you're linking to an old library.

I'm using 5.2.8.0. Isn't it the latest?

Anyway I'm having issues with this version that I hadn't in previous versions (for example: multithreading API stopped to work, as well as most of the native dialog stuff, and reading events using al_wait_for_events seems to be laggy while using al_is_event_queue_empty+al_get_next_event works way better).

As said, using Allegro 5.2.8.0 installed from sources on Debian 11.

-----------------
Current projects: Allegro.pas | MinGRo

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Niunio
Member #1,975
March 2002
avatar

I had older versions but they're not installed currently. I've installed in /usr/local/lib (I didn't change CMAKE+make nor use any command option).

I've revised /usr/local/lib and there's no reference to any other Allegro version.

-----------------
Current projects: Allegro.pas | MinGRo

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Niunio
Member #1,975
March 2002
avatar

No, I didn't use the package manager. I downloaded the sources, executed the CMAKE configuration and make install.

/usr/lib* directories don't have any Allegro file.

-----------------
Current projects: Allegro.pas | MinGRo

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Alright, well you're exhausting my ideas, but I'm not out yet.

First, in C, a function that isn't declared is by default a void function. If you didn't include the color addon header, they won't be declared, and when you use them, they will be undefined, because the linker is looking for different functions.

Or, you have headers older than 5.2.8 on your system. If you ever installed from source, they may be in /usr/local/include.

Finally, are you telling your Pascal linker about the color addon? You still have to link it.

Also, did cmake tell you if it was building the color addon or not?

Niunio
Member #1,975
March 2002
avatar

The original Allegro example works so yes, it had build the color addon.

About linking, yes: Pascal links the addon as other functions of the addon work.

I'm asking to Free Pascal people. Maybe they know something.

[edit]
Ok, found the problem.

You were right: there were some old stuff that conflicted, so I had to uninstall stuff, reinstall other stuff, recompile Allegro and bam! it now compiles.

Maybe that fixes the other issues I have. ::)

Thankyou very much. :)

-----------------
Current projects: Allegro.pas | MinGRo

Go to: