Lazarus

Programming => Databases => Topic started by: paolo_italy on November 29, 2021, 12:30:28 pm

Title: Lazarus, MacOS, MySQL and ZComponent debugging
Post by: paolo_italy on November 29, 2021, 12:30:28 pm
Hello everybody.

I am writing an application which connects to a remote MySQL DB using the last version of Component. It runs and I can debug it under Windows, it runs under Mac if launched via Terminal, but no way to debug it from the IDE: it says it cannot find the client library for MySQL and stops. It seems to me I have set everything correctly, the debugger is LLDB, and I can debug other apps not using ZComponent.
- Free Pascal Compiler version 3.2.2 [2021/05/16] for aarch64 (but I am compiling for x64)
- Lazarus 2.0.12
- libmysqlclient.20.dylib (for MySQL 5.7) stored in the same folder of the app
- MacOS BigSur running on M1

Any suggestion for me?

Many thanks
Paolo
Title: Re: Lazarus, MacOS, MySQL and ZComponent debugging
Post by: Zvoni on November 29, 2021, 02:03:55 pm
Have you tried the Full Path to the dylib?
Title: Re: Lazarus, MacOS, MySQL and ZComponent debugging
Post by: paolo_italy on November 29, 2021, 07:14:24 pm
The first thing I did was to use the Library property, set to './libmysqlclient.dylib'; both libmysqlclient.20.dylib and libmysqlclient.dylib (alias to it) were into the same folder of the app.

right now I have debugger working under MacOS:
- installed MySQL on my Mac using Homebrew
- adjusted .profile_bash and symlink to the installed library
- set Library property to empty string

I prefer a 'non installation' of MySQL on customers machines, but it will be a problem in the future.

TinyPortal © 2005-2018