how can I pack Library (*.dylib) files into the App container? lazarus / 33-macOS - Mac OS X ---------------------------------------------------------------------- mapolat · 2011-08-19 15:08 I would like to pack the library files (*.dylib) into the application containers (*.app). So I would like to pass libraries, which developed from me,  compactly with my application. How can I do it in Lazarus? sorry for my bad english. ---------------------------------------------------------------------- IndianaJones · 2011-08-19 15:15 PackageMaker tool can be the solution for this. If you are using >10.6 it is in the /Development/Applications/Utilities directory. ---------------------------------------------------------------------- mapolat · 2011-08-19 21:03 Hi IndianaJones, many thanks for quickly answer. But, PackageMaker is an installation routine. It copies the components in specified directories. And in addition; I cannot select the "/usr/lib/" directory as the destination directory for *.dylib files, this is not visible in Open/ChoiceDirectoryDialog on PackageManager-Configurationsdialog. I also meant completely what differently. The *.dylib file should be packed directly in *.app container, thus I have an portable *.app file and not an installation routine. ---------------------------------------------------------------------- IndianaJones · 2011-08-19 22:50 So the result is, you want to copy .dylib file in your application directory isnt it? ---------------------------------------------------------------------- mapolat · 2011-08-20 07:52 I have tried it. It has not worked. The applikation does not start if mylib.dylib not in "/usr/lib/" is. How can I to reference on mylib.dylib in *.app container? This tries were without success:    DynLibs.LoadLibrary(mylib.dylib)    DynLibs.LoadLibrary(./mylib.dylib) I must say: I am a beginner in the MAC and Lazarus environments. I come from Win and Delphi world. ---------------------------------------------------------------------- felipemdc · 2011-08-20 12:10 Which library exactly are you trying to load? Are you importing its functions statically or dynamically? The difference is explained here: http://wiki.lazarus.freepascal.org/Lazarus/FPC_Libraries#External_- _statically_loading_a_dynamic_library If you dynamically loading the library, it should be easy, just obtain the path to the Bundle and then loaded from a path based on that: http://wiki.lazarus.freepascal.org/OS_X_Programming_Tips#How_to_obtain _the_path_to_the_Bundle If you are statically loading, then it is also possible, I already did this once, but I forgot completely how to do it =D Search the Free Pascal mailling list or Mac-Pascal mailling list. I'm sure that somewhere there explains how to do it. ---------------------------------------------------------------------- mapolat · 2011-08-20 16:15 Hi felipemdc, This was what I had searched. It works! Thousand thanks.