comparison build/README.osx @ 239:cc467e52da4c

* Add platform README files
author cannam
date Mon, 10 Nov 2008 12:39:19 +0000
parents
children e02c93c4de8f
comparison
equal deleted inserted replaced
238:4b5a3031cd08 239:cc467e52da4c
1
2 The Vamp Plugin SDK -- Platform Notes for OS/X
3 ==============================================
4
5 Building at the command line
6 ----------------------------
7
8 To build the SDK, example plugins, and command-line host:
9
10 $ make -f Makefile.osx
11
12 Note that you must have libsndfile
13 (http://www.mega-nerd.com/libsndfile/) installed in order to build the
14 command-line host successfully. To build only the SDK and examples:
15
16 $ make -f Makefile.osx sdk examples
17
18 If you are using an IDE, you may prefer to simply add the .h and .cpp
19 files in the vamp-sdk and/or vamp-hostsdk directories to your existing
20 project.
21
22
23 Installing the Example Plugins
24 ------------------------------
25
26 To install the example plugins so you can load them in Vamp hosts,
27 copy the files
28
29 examples/vamp-example-plugins.dylib
30 and
31 examples/vamp-example-plugins.cat
32
33 to
34 /Library/Audio/Plug-Ins/Vamp/
35 or
36 $HOME/Library/Audio/Plug-Ins/Vamp/
37
38
39 Plugin Linkage
40 --------------
41
42 Vamp plugins are distributed as dynamic libraries (.dylib). A
43 well-packaged Vamp plugin library should export exactly one public
44 symbol, namely the Vamp API entry point vampGetPluginDescriptor.
45
46 The default for the OS/X linker is to export all of the symbols in the
47 library. This will work (the host will be able to load the plugin),
48 but it unnecessarily pollutes the host's symbol namespace, it may
49 cause symbol collisions in some esoteric circumstances, and it
50 increases the amount of time the plugin takes to load.
51
52 To improve this behaviour, you can instruct the linker to export only
53 the one required symbol using a symbols list file. To do this, place
54 the single line
55
56 _vampGetPluginDescriptor
57
58 (with leading underscore) into a text file, and then use the
59 -exported_symbols_list option to the linker to tell it to refer to
60 this file. All other symbols will then be properly hidden.
61
62 The Makefile.osx included in this SDK uses this method to manage
63 symbol visibility for the included example plugins, using the file
64 build/vamp-plugin.list. There are other methods that will work too,
65 but this one is simple and has the advantage of requiring no changes
66 to the code.
67