jl.da
jl.da

Reputation: 627

How do I install portsf?

I am reading the Audio Programming Book by Richard Boulanger and I am at the point where the library portsf is presented and it is used in the examples. Portsf did not come with the DVD I found in the library of my university, but I have found it in this link. However I have not found any resources on how to compile it in any platform.

I would like to know how to install it in OSX.

Upvotes: 1

Views: 1530

Answers (1)

Michael
Michael

Reputation: 66

I only know how to install it in Linux, but since OSX uses a Unix like filesystem I'm sure it's similar. If you go into the portsf directory and type the "make" command you will get a libportsf.a file as a result. This file needs to go inside the directory that stores all of your archive library files. In Linux that directory is /usr/lib. Also the ieee80.h and portsf.h header files need to go inside the directory that stores all of your headers. I put them in /usr/include since that's where all my header files are located. Finally, to create an executable program you want to link it with the portsf library with the -lportsf option. For example: if I want to compile the sf2float.c program I type the following command: gcc sf2float.c -lportsf -lm -o sf2float that should create an executable file called sf2float. I have to use the -lm option because I'm including the math.h header file in sf2float.c Hope that helps.

Upvotes: 5

Related Questions