Recent

Author Topic: Lazarus, MacOS, MySQL and ZComponent debugging  (Read 2259 times)

paolo_italy

  • Newbie
  • Posts: 2
Lazarus, MacOS, MySQL and ZComponent debugging
« 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

Zvoni

  • Hero Member
  • *****
  • Posts: 827
Re: Lazarus, MacOS, MySQL and ZComponent debugging
« Reply #1 on: November 29, 2021, 02:03:55 pm »
Have you tried the Full Path to the dylib?
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad

paolo_italy

  • Newbie
  • Posts: 2
Re: Lazarus, MacOS, MySQL and ZComponent debugging
« Reply #2 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