Csound Csound-dev Csound-tekno Search About

[CSOUND-DEV:5229] csoundlib in csound4?

Date2004-08-20 11:08
FromvanDongen/Gilcher
Subject[CSOUND-DEV:5229] csoundlib in csound4?
AttachmentsNone  

Date2004-08-20 12:55
Fromramsdell@mitre.org (John D. Ramsdell)
Subject[CSOUND-DEV:5230] Re: csoundlib in csound4?
vanDongen/Gilcher  writes:

> It seems that libcsound is not included in the regular csound
> release.  Or at least that the installed libcsound.a is compiled
> with jpff_glue instead of csound.c, making it useless for programs
> using the API.
> 
> What version should I tell people to get if they want to use my
> jcsound program that requires a libcsound installed?

Please use the distribution of Csound 4 from the Csound SourceForge
project's csoundgbs package.  This release contains an info file and
an HTML document that describes how to use csound-config with your
application's Makefile so as to give it the correct paths to Csound's
library and header files.

If you install Csound using the RPM, Csound's info documentation will
appear in the top-level info node for the system.  You can easily find
it using the info shell command and via Emacs.

The Csound library is also known to build with MinGW/MSYS on Windows
2000.  You can configure it to build a DLL too.  See the README.

The Windows installer just installs the FLTK-based GUI.  I could
modify it to install the Csound library if there is a natural place to
put it, and a way to tell applications where to find it.  The Windows
installer already modifies the registry, but I don't know the
conventions for installing libraries or anything about Microsoft's
development tools.

> I think the same goes for wxcsound as well.

I have not been working on wxcsound as the other developers seem to
favor FLTK.  Csoundgbs contains a simple FLTK based GUI, but if anyone
is interested in improving wxcsound, I'll help you get started.

The current release of the csoundgbs package is 4.23f12gbs.3, a
version that, baring bug reports, I expect will be quite stable.  I
have enclosed the relevant info node.

John

File: csoundgbs.info,  Node: Csound API,  Prev: Introduction,  Up: Top

Building Applications Using the Csound API
******************************************

   The GBS distribution builds and installs programs, libraries, and
headers.  One library provides the Csound API.  After installation, the
GBS distribution makes the Csound API header available to C and C++
programs with:

     #include 

   The program `csound-config' prints the compiler options required to
build and link programs that use the Csound API.  For small
applications, the easiest way to use this programs is to start your
project's `Makefile' with the following:

     CFLAGS=`csound-config --cflags`
     CXXFLAGS=`csound-config --cxxflags`
     LDFLAGS=`csound-config --ldflags`
     LDLIBS=`csound-config --libs`

   Projects that use `autoconf' can make use of the `csound-config'
program by including the following text in its `configure.ac':

     AC_ARG_VAR([CSOUND_CONFIG],
     	   [Path to the Csound configuration script when available])
     AC_PATH_PROG([CSOUND_CONFIG], [csound-config])
     
     if test -n "$CSOUND_CONFIG"; then
       CFLAGS="$CFLAGS `$CSOUND_CONFIG --cflags`"
       CXXFLAGS="$CXXFLAGS `$CSOUND_CONFIG --cxxflags`"
       LDFLAGS="$LDFLAGS `$CSOUND_CONFIG --ldflags`"
       LIBS="$LIBS `$CSOUND_CONFIG --static --libs`"
     else
       AC_MSG_ERROR(cannot find Csound package)
     fi

   Note that the author of this `configure.ac' specified that the
Csound library be statically linked into their program even if a shared
version of the library is available.

   The `csound-config' program can be used even when the GBS
distribution is not installed.  The `--inplace' option will print the
appropriate compiler options for a version of Csound built within the
source directories.

   The complete set of options supported by `csound-config' follow:

     $ csound-config --help
     Usage: csound-config [options]
     Options:
       --prefix[=DIR]        Show or set the prefix
       --exec-prefix[=DIR]   Show or set the exec-prefix
       --basename            Show the package base name
       --version             Show the version
       --cflags              Show the flags to compile C with Csound
       --cxxflags            Show the flags to compile C++ with Csound
       --ldflags             Show the flags to link with Csound
       --libs                Show the library flags to link with Csound
       --static              When displaying libraries, show the static ones
       --cc                  Show C compiler used to build Csound
       --cxx                 Show C++ compiler used to build Csound
       --inplace             Use the build directory instead the install directories

> regards
> Gerard
> 
> -- 
> electronic & acoustic musics-- http://www.xs4all.nl/~gml