Recent

Author Topic: How to download/compile libqt6pas Framework MacOS  (Read 665 times)

Theo11

  • New member
  • *
  • Posts: 9
How to download/compile libqt6pas Framework MacOS
« on: March 13, 2025, 12:17:47 pm »
Hi,

I am using Lazarus on MacOS and I want to do cross development for Mac and Windows. So I want to switch to QT6.

For that I need libqt6pas Framework library on MacOS.

Thanks,
Theo.

zeljko

  • Hero Member
  • *****
  • Posts: 1734
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: How to download/compile libqt6pas Framework MacOS
« Reply #1 on: March 13, 2025, 12:49:18 pm »
qmake is inside qt installation directory, eg /Users/foo/qt/6.5.3/macos/bin, use it with full path and it'll compile bindings w/o problems.

Theo11

  • New member
  • *
  • Posts: 9
Re: How to download/compile libqt6pas Framework MacOS
« Reply #2 on: March 19, 2025, 02:05:02 pm »
Hi Zeljko,

I don't have this folder.
Where do I get this?

I have downloaded qtbase-everywhere-src-6.8.2 tar file, but it has a different structure you are referring to.

Kind regards,
Theo.

zeljko

  • Hero Member
  • *****
  • Posts: 1734
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: How to download/compile libqt6pas Framework MacOS
« Reply #3 on: March 19, 2025, 06:13:35 pm »
Ah ,I'm using Qt installer so that's why I have everything at right place. Haven't tried build qt from source on mac, so cannot help you.

Theo11

  • New member
  • *
  • Posts: 9
Re: How to download/compile libqt6pas Framework MacOS
« Reply #4 on: March 24, 2025, 11:28:12 am »
Hi,

I am a step further, I have downloaded QT, brew install qt, and is now in folder /opt/homebrew/Cellar/qt, it's version 6.8.2_1.
So I have now qmake installed.  :D
Then I did the following:
- cd /Applications/lazarus/lcl/interfaces/qt6/cbindings
- qmake
- make
- make install
No errors, then I did:
- cd /Library/Frameworks
- ln -s /opt/homebrew/lib/Qt6Pas.framework .

Changed to QT6 widget in Lazaurs and added /Library/Frameworks/ to the library path.
When compiling the code I get a link error:
- Error: ld: framework 'Qt6Pas' not found

What is missing? :(
Any help?

Thanks,
Theo.

zeljko

  • Hero Member
  • *****
  • Posts: 1734
    • http://wiki.lazarus.freepascal.org/User:Zeljan
Re: How to download/compile libqt6pas Framework MacOS
« Reply #5 on: March 24, 2025, 11:32:32 am »
Add -L/Library/Frameworks to the lazarus build options.

Theo11

  • New member
  • *
  • Posts: 9
Re: How to download/compile libqt6pas Framework MacOS
« Reply #6 on: March 24, 2025, 09:33:30 pm »
I have already added the /Library/Frameworks, but still no success.
These are my compiler options:
/usr/local/bin/fpc
-Tdarwin
-Paarch64
-MObjFPC
-Scghi
-O1
-gw3
-gl
-l
-vewnhibq
-Filib/aarch64-darwin
-Fl/Library/Frameworks
-Fu/Applications/lazarus/lcl/units/aarch64-darwin/qt6
-Fu/Applications/lazarus/lcl/units/aarch64-darwin
-Fu/Applications/lazarus/components/freetype/lib/aarch64-darwin
-Fu/Applications/lazarus/components/lazutils/lib/aarch64-darwin
-Fu/Applications/lazarus/packager/units/aarch64-darwin
-Fu.
-FUlib/aarch64-darwin
-FE.
-osdmanager
-dLCL
-dLCLqt6

Any hints?

Theo.

 

TinyPortal © 2005-2018