Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] how to start using the cSound API

Date2008-01-23 15:39
FromMichael Gogins
SubjectRe: [Cs-dev] how to start using the cSound API
-lMYLIB will link either to libMYLIB.a or to MYLIB.dll, preferring MYLIB.dll.

Whatever you see if you run pexports MYLIB.dll, that is what you can call.

The C++ API is in layers. The lowest layer (Csound, declared in csound.hpp) is in csound.dll, the higher and possibly more useful layers (CppSound, declared in CppSound.hpp) are in csnd.dll which calls csound.dll.

Note, however, that the functions you see in csound.hpp call only C API functions, this header file simply provides a low-level C++ wrapper to the C API. Whereas CppSound adds functionality, particularly for storing score and orchestra files internally, and building up scores with the API (that is why it exists).

When I do stuff like this, I use CppSound, not Csound. Basically, if you want to store the Csound code in your program, you are better off with CppSound, but if you want to use the API to run Csound code from pre-existing files on the disk, the Csound class is simpler.

Hope this helps,
Mike

-----Original Message-----
>From: Rory Walsh 
>Sent: Jan 23, 2008 7:54 AM
>To: Developer discussions 
>Subject: Re: [Cs-dev] how to start using the cSound API
>
>You've mentioned that you can link directly to the dll before, can you 
>explain this further, I've no idea how to do it? DO I have to use dll 
>functions in my code?
>
>Michael Gogins wrote:
>> It depends on the compiler. What compiler are you using? If you are using 
>> gcc (i.e. MinGW) then you can link directly to the DLL. If you are using 
>> Microsoft C++ (i.e. MSVC), then you need to generate a .lib file from the 
>> .dll as I have earlier specified on this list.
>> 
>> The reason we do not include the .lib file is because the Windows installer 
>> version is built with MinGW, not MSVC.
>> 
>> Hope this helps,
>> Mike
>> 
>> ----- Original Message ----- 
>> From: "Carsten Høyer" 
>> To: 
>> Sent: Wednesday, January 23, 2008 4:37 AM
>> Subject: [Cs-dev] how to start using the cSound API
>> 
>> 
>>> Hi
>>> Yesterday i tried to begin using the cSound API. I have been looking at
>>> 2 documents:
>>> Rory Walsh: Introduction to the csound host API Link
>>> 
>>> Csound API reference manual Link 
>>> 
>>>
>>> The reference manual says i need to include csound.h and link to
>>> libcsound.a, on windows (where i am right now), it should be csound.h
>>> and csound.lib or csound.dll. I only have the header files not the
>>> library files - i have downloaded csound compiled and the source files.
>>> So here is my question:
>>>
>>> To get the library files, do i need to compile csound from source? or is
>>> it that the library files are really named something different these days?
>>>
>>> Thank you
>>> Carsten
>>>
>>> Sub question: are there any other documents on the API out there, than
>>> the ones i have linked to?
>>>
>>> -------------------------------------------------------------------------
>>> 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
>>> https://lists.sourceforge.net/lists/listinfo/csound-devel 
>> 
>> 
>> -------------------------------------------------------------------------
>> 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
>> https://lists.sourceforge.net/lists/listinfo/csound-devel
>> 
>
>-------------------------------------------------------------------------
>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
>https://lists.sourceforge.net/lists/listinfo/csound-devel




-------------------------------------------------------------------------
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
https://li