Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Csound API - a ready to use .lib, please

Date2008-01-07 01:36
From"Michael Gogins"
SubjectRe: [Cs-dev] Csound API - a ready to use .lib, please
Attachmentscsound64.lib  csoundclient.c  None  None  
The following assumes double-precision Csound, and that you only need the C 
API, not the C++ API. I have verified that this works and in fact I have 
attached the resulting import lib.

1. First of all, the csound.def file should already be there from the 
Windows installer (in the bin directory). But if it's not, use the MinGW 
pexports program (which you can download and run separately) to inspect the 
csound64.dll.5.1 file and pipe the names of the exported functions to 
csound64.def:

pexports csound64.dll.5.1 > csound64.def

You could also use the MSVC dumpbin program:

dumpbin /exports cound64.dll.5.1 > csound64.def

but you would have to edit the csound64.def file to get of unnecessary 
stuff. All you need is the names of the API functions, one per line.

I'm not sure if you need the LIBRARY header, but if you do, add the 
following line to the top of the csound64.def file:

LIBRARY csound64.dll.5.1

2. Use the MSVC lib program to create an import library from the 
csound64.def file:

lib /def:csound64.def

This will produce csound64.lib. This implements the C API and part of the 
C++ API (the part in csound.hpp). If you need the complete C++ API, repeat 
the above procedure with csnd.dll and perhaps CsoundAC.dll.

I proved this works by creating a simple Csound client program, also 
attached, that worked, with MSVC using this command:

cl /D_WIN32 /DUSE_DOUBLE csoundclient.c csound64.lib -o csoundclient

Hope this helps,
Mike

----- Original Message ----- 
From: "victor" 
To: "Developer discussions" 
Sent: Sunday, January 06, 2008 6:08 PM
Subject: Re: [Cs-dev] Csound API - a ready to use .lib, please


> Sorry, I don't do MSVC with csound anymore.But creating the lib from
> DLL should be easy.
>
> ----- Original Message ----- 
> From: "Rory Walsh" 
> To: "Developer discussions" 
> Sent: Sunday, January 06, 2008 9:40 PM
> Subject: Re: [Cs-dev] Csound API - a ready to use .lib, please
>
>
>> Sorry Andrea, I don't use MSVC, Victor does however, perhaps he can
>> advise. Why not simply use MinGW?
>>
>>
>>> I'm trying to compile csound_main.c using (just) the bin distribution,
>>> in order to start the development of a new front-end.
>>> I'll work with MSVC(6) in Windows.
>>>
>>> I'm really spending --too much time-- in trying to recreate the
>>> libcsound.lib from csound32.dll.5.1.
>>>
>>>  >> Could anybody give me a link to an already generated .lib file ?
>>>
>>> I tried everything: read Rory Walsh tutorial, downloaded and used
>>> pexports, installed the whole mingw (94MB), used the distributed
>>> csound32.def, recreated it, etc etc, and still I get nothing from
>>> dlltool.
>>> I do not want to rebuild the whole csound. Using just the API should be
>>> the correct way to start a front-end project, am I wrong ?
>>>
>>> Why this simple .lib is not simply included in the bin distribution ?
>>>
>>> Thanks in advance.
>>> Andrea
>>>
>>> -------------------------------------------------------------------------
>>> This SF.net email is sponsored by: Microsoft
>>> Defy all challenges. Microsoft(R) Visual Studio 2005.
>>> 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 2005.
>> 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 2005.
> 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 

Date2008-01-07 18:11
From"andrea.chiodi@semanticweb.it"
SubjectRe: [Cs-dev] Csound API - a ready to use .lib, please
Thanks a lot.

I was able to compile csound_main.

Michael Gogins ha scritto:
> The following assumes double-precision Csound, and that you only need 
> the C API, not the C++ API. I have verified that this works and in fact 
> I have attached the resulting import lib.
> 
> 1. First of all, the csound.def file should already be there from the 
> Windows installer (in the bin directory). But if it's not, use the MinGW 
> pexports program (which you can download and run separately) to inspect 
> the csound64.dll.5.1 file and pipe the names of the exported functions 
> to csound64.def:
> 
> pexports csound64.dll.5.1 > csound64.def
> 
> You could also use the MSVC dumpbin program:
> 
> dumpbin /exports cound64.dll.5.1 > csound64.def
> 
> but you would have to edit the csound64.def file to get of unnecessary 
> stuff. All you need is the names of the API functions, one per line.
> 
> I'm not sure if you need the LIBRARY header, but if you do, add the 
> following line to the top of the csound64.def file:
> 
> LIBRARY csound64.dll.5.1
> 
> 2. Use the MSVC lib program to create an import library from the 
> csound64.def file:
> 
> lib /def:csound64.def
> 
> This will produce csound64.lib. This implements the C API and part of 
> the C++ API (the part in csound.hpp). If you need the complete C++ API, 
> repeat the above procedure with csnd.dll and perhaps CsoundAC.dll.
> 
> I proved this works by creating a simple Csound client program, also 
> attached, that worked, with MSVC using this command:
> 
> cl /D_WIN32 /DUSE_DOUBLE csoundclient.c csound64.lib -o csoundclient
> 
> Hope this helps,
> Mike
> 
> ----- Original Message ----- From: "victor" 
> To: "Developer discussions" 
> Sent: Sunday, January 06, 2008 6:08 PM
> Subject: Re: [Cs-dev] Csound API - a ready to use .lib, please
> 
> 
>> Sorry, I don't do MSVC with csound anymore.But creating the lib from
>> DLL should be easy.
>>
>> ----- Original Message ----- From: "Rory Walsh" 
>> To: "Developer discussions" 
>> Sent: Sunday, January 06, 2008 9:40 PM
>> Subject: Re: [Cs-dev] Csound API - a ready to use .lib, please
>>
>>
>>> Sorry Andrea, I don't use MSVC, Victor does however, perhaps he can
>>> advise. Why not simply use MinGW?
>>>
>>>
>>>> I'm trying to compile csound_main.c using (just) the bin distribution,
>>>> in order to start the development of a new front-end.
>>>> I'll work with MSVC(6) in Windows.
>>>>
>>>> I'm really spending --too much time-- in trying to recreate the
>>>> libcsound.lib from csound32.dll.5.1.
>>>>
>>>>  >> Could anybody give me a link to an already generated .lib file ?
>>>>
>>>> I tried everything: read Rory Walsh tutorial, downloaded and used
>>>> pexports, installed the whole mingw (94MB), used the distributed
>>>> csound32.def, recreated it, etc etc, and still I get nothing from
>>>> dlltool.
>>>> I do not want to rebuild the whole csound. Using just the API should be
>>>> the correct way to start a front-end project, am I wrong ?
>>>>
>>>> Why this simple .lib is not simply included in the bin distribution ?
>>>>
>>>> Thanks in advance.
>>>> Andrea
>>>>
>>>> ------------------------------------------------------------------------- 
>>>>
>>>> This SF.net email is sponsored by: Microsoft
>>>> Defy all challenges. Microsoft(R) Visual Studio 2005.
>>>> 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 2005.
>>> 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 2005.
>> 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 2005.
> 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


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net