Csound Csound-dev Csound-tekno Search About

[Cs-dev] linking with csound

Date2008-01-29 19:40
FromJonatan Liljedahl
Subject[Cs-dev] linking with csound
most other libraries/applications that one can link with your own apps
has some way of telling their location in a specific installation.

in the old days, each lib used to have a script called
"something-config" that gave the appropriate link and cflags, now most
uses pkg-config instead, like this:

] pkg-config --cflags --libs sndfile
-I/Programs/LibSndfile/1.0.16/include  -L/Programs/LibSndfile/1.0.16/lib
-lsndfile

Why doesn't csound have something like this? how are host applications
supposed to find csound?

-- 
/Jonatan         [ http://kymatica.com ]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-01-29 19:53
FromRory Walsh
SubjectRe: [Cs-dev] linking with csound
Usually the user has Csound added to their path environment hence no 
problem. I think Art has produced front ends that come with Csound and 
everything runs from the directory you unpack to, especially useful for 
those who don't have Csound. A fully functional Csound is only a few 
megabytes.

Rory.



Jonatan Liljedahl wrote:
> most other libraries/applications that one can link with your own apps
> has some way of telling their location in a specific installation.
> 
> in the old days, each lib used to have a script called
> "something-config" that gave the appropriate link and cflags, now most
> uses pkg-config instead, like this:
> 
> ] pkg-config --cflags --libs sndfile
> -I/Programs/LibSndfile/1.0.16/include  -L/Programs/LibSndfile/1.0.16/lib
> -lsndfile
> 
> Why doesn't csound have something like this? how are host applications
> supposed to find csound?
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-01-29 20:08
FromJonatan Liljedahl
SubjectRe: [Cs-dev] linking with csound
Rory Walsh wrote:
> Usually the user has Csound added to their path environment hence no 
> problem.

I don't mean the 'csound' executable but the shared library and headers.

> I think Art has produced front ends that come with Csound and 
> everything runs from the directory you unpack to, especially useful for 
> those who don't have Csound. A fully functional Csound is only a few 
> megabytes.

Sure, I can see why that is useful. But I think there's also a lot of
people (like me) who wants to take advantage of dynamic linking and keep
a single copy of a library instead of embedding it in all apps that uses
it. Especially when the library is such a big (not in disk-space though)
and powerful thing as csound.

I suppose it's easy to create a csound.pc pkg-config file and let the
installer put it there..

-- 
/Jonatan         [ http://kymatica.com ]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-01-29 20:25
FromRory Walsh
SubjectRe: [Cs-dev] linking with csound
Sorry I misunderstood your post!

Jonatan Liljedahl wrote:
> Rory Walsh wrote:
>> Usually the user has Csound added to their path environment hence no 
>> problem.
> 
> I don't mean the 'csound' executable but the shared library and headers.
> 
>> I think Art has produced front ends that come with Csound and 
>> everything runs from the directory you unpack to, especially useful for 
>> those who don't have Csound. A fully functional Csound is only a few 
>> megabytes.
> 
> Sure, I can see why that is useful. But I think there's also a lot of
> people (like me) who wants to take advantage of dynamic linking and keep
> a single copy of a library instead of embedding it in all apps that uses
> it. Especially when the library is such a big (not in disk-space though)
> and powerful thing as csound.
> 
> I suppose it's easy to create a csound.pc pkg-config file and let the
> installer put it there..
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-01-29 20:34
FromJonatan Liljedahl
SubjectRe: [Cs-dev] linking with csound
Ok!
BTW, there's also the point that pkg-config gives not only how to link
with csound, but also the library dependencies that csound has (like
libsndfile, etc..), so linking with csound would be as simple as:

gcc -o myhost myhost.c `pkg-config --cflags --libs csound`

I just found this: http://www.scons.org/wiki/ReplacementBuilder
which gives a solution on how to make scons create a pkg-config file
with the right values in it.

I know nothing of scons (I use autotools myself) so I'm afraid I can't
help with this myself..

Rory Walsh wrote:
> Sorry I misunderstood your post!
> 
> Jonatan Liljedahl wrote:
>> Rory Walsh wrote:
>>> Usually the user has Csound added to their path environment hence no 
>>> problem.
>> I don't mean the 'csound' executable but the shared library and headers.
>>
>>> I think Art has produced front ends that come with Csound and 
>>> everything runs from the directory you unpack to, especially useful for 
>>> those who don't have Csound. A fully functional Csound is only a few 
>>> megabytes.
>> Sure, I can see why that is useful. But I think there's also a lot of
>> people (like me) who wants to take advantage of dynamic linking and keep
>> a single copy of a library instead of embedding it in all apps that uses
>> it. Especially when the library is such a big (not in disk-space though)
>> and powerful thing as csound.
>>
>> I suppose it's easy to create a csound.pc pkg-config file and let the
>> installer put it there..


-- 
/Jonatan         [ http://kymatica.com ]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-01-29 21:00
FromAnthony Kozar
SubjectRe: [Cs-dev] linking with csound
I think the answer to your question is that most of the dev team has been
learning about packaging as we go along.  Csound used to just be distributed
as a .tgz or .zip with no installer.  The other issue is that most of us
have a limited variety of systems to test Csound installation on.

John Ramsdell was working on an autotools-based system for 4.23 and it
included a csound-config script.  However, fairly early on in Csound 5
development, we gave up on autotools.

Jonatan Liljedahl wrote on 1/29/08 3:34 PM:

> so linking with csound would be as simple as:
> gcc -o myhost myhost.c `pkg-config --cflags --libs csound`

This would be nice!

> I just found this: http://www.scons.org/wiki/ReplacementBuilder
> which gives a solution on how to make scons create a pkg-config file
> with the right values in it.
> 
> I know nothing of scons (I use autotools myself) so I'm afraid I can't
> help with this myself..

scons is easy to learn -- I barely know anything about it or about Python
and I can make modifications to the SConstruct script when I need to.

If you would like to see better portability for building host apps, please
contribute the changes!

Jonatan Liljedahl wrote on 1/29/08 2:40 PM:

> most other libraries/applications that one can link with your own apps
> has some way of telling their location in a specific installation.
> 
> in the old days, each lib used to have a script called
> "something-config" that gave the appropriate link and cflags, now most
> uses pkg-config instead, like this:
> 
> ] pkg-config --cflags --libs sndfile
> -I/Programs/LibSndfile/1.0.16/include  -L/Programs/LibSndfile/1.0.16/lib
> -lsndfile
> 
> Why doesn't csound have something like this? how are host applications
> supposed to find csound?


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net

Date2008-01-29 21:23
FromRory Walsh
SubjectRe: [Cs-dev] linking with csound
That would be nice. Right now I have a scons setup that I use for 
building all my csound stuff and that work's well for me, I'll probably 
just stick with that approach unless I find some limitations with it.

Rory.



Jonatan Liljedahl wrote:
> Ok!
> BTW, there's also the point that pkg-config gives not only how to link
> with csound, but also the library dependencies that csound has (like
> libsndfile, etc..), so linking with csound would be as simple as:
> 
> gcc -o myhost myhost.c `pkg-config --cflags --libs csound`
> 
> I just found this: http://www.scons.org/wiki/ReplacementBuilder
> which gives a solution on how to make scons create a pkg-config file
> with the right values in it.
> 
> I know nothing of scons (I use autotools myself) so I'm afraid I can't
> help with this myself..
> 
> Rory Walsh wrote:
>> Sorry I misunderstood your post!
>>
>> Jonatan Liljedahl wrote:
>>> Rory Walsh wrote:
>>>> Usually the user has Csound added to their path environment hence no 
>>>> problem.
>>> I don't mean the 'csound' executable but the shared library and headers.
>>>
>>>> I think Art has produced front ends that come with Csound and 
>>>> everything runs from the directory you unpack to, especially useful for 
>>>> those who don't have Csound. A fully functional Csound is only a few 
>>>> megabytes.
>>> Sure, I can see why that is useful. But I think there's also a lot of
>>> people (like me) who wants to take advantage of dynamic linking and keep
>>> a single copy of a library instead of embedding it in all apps that uses
>>> it. Especially when the library is such a big (not in disk-space though)
>>> and powerful thing as csound.
>>>
>>> I suppose it's easy to create a csound.pc pkg-config file and let the
>>> installer put it there..
> 
> 

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net