Porting to Mac OS X lazarus / 31-LCL ---------------------------------------------------------------------- simunovics · 2013-05-06 17:07 I am porting a project from windows to mac os x. During compilation of a library, I am getting an error: ... Undefined symbols for architecture x86_64:   "_LSOpenCFURLRef", referenced from:       _LCLINTF_OPENURL$ANSISTRING$$BOOLEAN in lclintf.o ld: symbol(s) not found for architecture x86_64 An error occurred while linking ... The only reference I can find is: unit xyz; {$MODE Delphi} interface uses   LCLIntf, ... but even if I remove LCLIntf, I get the same error. I am new to lazarus, and I would be grateful for any advice. Thank you, Srdjan ---------------------------------------------------------------------- JuhaManninen · 2013-05-06 17:44 Did you use the Delphi converter? Tools -> Convert Delphi Project to Lazarus Project ... ---------------------------------------------------------------------- jwdietrich · 2013-05-06 19:25 The function LSOpenCFURLRef is part of the Launch Services of Mac OS X. It opens an item designated by URL, in the default manner in its preferred application. In the LCL (with Carbon widgetset), LSOpenCFURLRef is invoked by the OpenURL function. It may be not (yet) implemented for the x86_64 target. I think the first question you should ask yourself is if you really need a 64-bit application. In general, 32-bit applications raise less problems (and unlike the 64-bit versions they are also compatible with older hardware), therefore it may be a better option to compile for a 32-bit architecture (unless you have very special requirements like access to huge data chunks at a stretch) ---------------------------------------------------------------------- simunovics · 2013-05-06 22:44 Yes. I used the converter option. Quote from: JuhaManninen on May 06, 2013, 07:44:26 pmDid you use the Delphi converter? Tools -> Convert Delphi Project to Lazarus Project ... ---------------------------------------------------------------------- simunovics · 2013-05-06 23:03 I am using lazarus-ide built under fink in mac os x. When I switch the compile option to i386 I get errors like: > ld: warning: ld: warning: ld: warning: ignoring file /sw/lib//libgtk-x11-2.0.dylib, file was built for unsupported file format  and the library is a symbolic link to: lib > file /sw/lib/libgtk-x11-2.0.0.dylib /sw/lib/libgtk-x11-2.0.0.dylib: Mach-O 64-bit dynamically linked shared library So, I guess, I would need to rebuild everything. Bummer. Quote from: jwdietrich on May 06, 2013, 09:25:33 pmThe function LSOpenCFURLRef is part of the Launch Services of Mac OS X. It opens an item designated by URL, in the default manner in its preferred application. In the LCL (with Carbon widgetset), LSOpenCFURLRef is invoked by the OpenURL function. It may be not (yet) implemented for the x86_64 target. I think the first question you should ask yourself is if you really need a 64-bit application. In general, 32-bit applications raise less problems (and unlike the 64-bit versions they are also compatible with older hardware), therefore it may be a better option to compile for a 32-bit architecture (unless you have very special requirements like access to huge data chunks at a stretch) ---------------------------------------------------------------------- simunovics · 2013-05-06 23:45 Lazarus from: http://sourceforge.net/projects/lazarus/files/Lazarus%20Mac%20OS%20X%2 0i386/Lazarus%201.0.8/ compiles the code without the errors (so far). I ditched the fink version. ---------------------------------------------------------------------- kamischi · 2013-05-07 07:03 Could you tell me more about the setup, where the fink package failed, such as OS version, tree of fink if below 10.7. MiSchi ---------------------------------------------------------------------- simunovics · 2013-05-07 14:28 I have: fink -V Package manager version: 0.34.7 Distribution version: selfupdate-cvs Sun May  5 17:41:15 2013, 10.7, x86_64 Trees: local/main stable/main OS X 10.7.5 I used initially   lazarus-gtk2    1.0.8-1 Free Pascal IDE The failure was as above for 64bit version, and when I tried to switch to 32bit version, the libraries (e.g. gtk2) that were to be linked with were 64bit version so that the linking failed. I tried lazarus-aqua and it had some other issues that I do not remember right now. Quote from: kamischi on May 07, 2013, 09:03:08 amCould you tell me more about the setup, where the fink package failed, such as OS version, tree of fink if below 10.7. MiSchi ---------------------------------------------------------------------- rphoover · 2014-11-26 17:26 A proposed patch file that appears to work for Lazarus 1.2.6 running Qt on OSX Yosemite is provided.  It would be nice to have this rolled into the next version of Lazarus since this is the only item that prevents Lazarus from compiling when using Qt. Quote from: jwdietrich on May 06, 2013, 09:25:33 pmThe function LSOpenCFURLRef is part of the Launch Services of Mac OS X. It opens an item designated by URL, in the default manner in its preferred application. In the LCL (with Carbon widgetset), LSOpenCFURLRef is invoked by the OpenURL function. It may be not (yet) implemented for the x86_64 target. I think the first question you should ask yourself is if you really need a 64-bit application. In general, 32-bit applications raise less problems (and unlike the 64-bit versions they are also compatible with older hardware), therefore it may be a better option to compile for a 32-bit architecture (unless you have very special requirements like access to huge data chunks at a stretch)