| You cannot do csnd with MSVC, for reasons I explained before -- GNU
C++ and MSVC++ are binary incompatible. But you can use csound.hpp and
the Csound class, which are not in csnd.
Regards,
Mike
On Thu, Jul 8, 2010 at 11:13 PM, gafferuk wrote:
>
> am i right that theres problems converting the csnd.dll to a library using
> the instructions in my last post
> in the .def file as some of the function names are mangled and some are not?
> guess ill have to use mingw.
>
>
>
> gafferuk wrote:
>>
>> Found my answer on another page:
>> thanks all.
>>
>>
>> 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.
>>
>>
>>
>>
>> Michael Gogins-2 wrote:
>>>
>>> You'll have to create import libraries for the DLLs, using the
>>> Microsoft lib program. This explains how, there may other explanations
>>> elsewhere:
>>>
>>> http://wyw.dcweb.cn/dllfaq.htm
>>>
>>> You won't be able to link MSVC executables with MinGW static libraries
>>> (.a files).
>>>
>>> Regarding C++, you can use csound.hpp and the Csound class, but you
>>> will not be able to use CsoundAC or the CppSound class since these
>>> link to MinGW C++ objects that are in a different binary format than
>>> MSVC. The csound.hpp file and Csound class should work because it is a
>>> header file only library and the MSVC compiler will generate the C++
>>> code for you. The regular Csound DLL is the library for csound.hpp.
>>>
>>> For what it's worth, the Twilight Dragon Media build of MinGW is more
>>> or less as good as MSVC in terms of implementing C++, and you can use
>>> CodeBlocks with it if you prefer to use an integrated development
>>> environment.
>>>
>>> Hope this helps,
>>> Mike
>>>
>>> On Wed, Jul 7, 2010 at 2:55 PM, gafferuk wrote:
>>>>
>>>> If I download the mingw win32 installer exe version of csound can I use
>>>> that
>>>> with visual studio? do I have to change anything to get it to work with
>>>> visual studio? and save me having to compile csound, i wish to use the
>>>> csound c++ api.
>>>>
>>>>
>>>> Michael Gogins-2 wrote:
>>>>>
>>>>> Not all of the code in Csound CVS will be usable with MSVC. Csound
>>>>> itself will compile and be usable but code that links Standard C+
>>>>> Library collections or classes based on or using them has trouble
>>>>> generating shared library (DLL) interfaces, last time I checked. That
>>>>> is why MinGW (GCC) is used to build the Csound distribution for
>>>>> Windows instead of MSVC (I have both).
>>>>>
>>>>> Look at the build-msvc-debug.bat file for how to use MSVC to build
>>>>> Csound. Use this and custom-msvc.py, or copy these files and modify
>>>>> them. The custom-msvc.py file is designed to contain paths to third
>>>>> party header files and libraries such as sndfile.h and it is designed
>>>>> to be edited by the user.
>>>>>
>>>>> Hope this helps,
>>>>> Mike
>>>>>
>>>>> On Wed, Jul 7, 2010 at 5:32 AM, wrote:
>>>>>> If you have sndfle.h it is clearly not being found by the scons
>>>>>> system.
>>>>>> Search paths in MSVC i suspect but it is some years since I used
>>>>>> Windows
>>>>>> machine for work.
>>>>>> ==JOhn ff
>>>>>>
>>>>>>>
>>>>>>> yes i have included header file and lib file.
>>>>>>>
>>>>>>> jpff-2 wrote:
>>>>>>>>
>>>>>>>> Do ypiu have th esndfile.h header file readable?
>>>>>>>>
>>>>>>>>>
>>>>>>>>> how do i compile csound using msvc?
>>>>>>>>>
>>>>>>>>> im using scons but when it gets to libsndfile is complains:
>>>>>>>>>
>>>>>>>>> Checking for C library sndfile... no
>>>>>>>>> The sndfile library is required to build Csound5
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> i have the libsndfile installed using the libsndfile binary
>>>>>>>>> installer
>>>>>>>>> exe
>>>>>>>>> provided off there website.
>>>>>>>>>
>>>>>>>>> what am i doing wrong? i dont wish to use mingw as my project is
>>>>>>>>> getting
>>>>>>>>> large now.
>>>>>>>>> --
>>>>>>>>> View this message in context:
>>>>>>>>> http://old.nabble.com/compiling-with-msvc-and-libsndfile--tp29086722p29086722.html
>>>>>>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>
>>>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>> "unsubscribe
>>>>>>>>> csound"
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>
>>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>> "unsubscribe
>>>>>>>> csound"
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>> View this message in context:
>>>>>>> http://old.nabble.com/compiling-with-msvc-and-libsndfile--tp29086722p29093928.html
>>>>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>
>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe
>>>>>>> csound"
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> Michael Gogins
>>>>> Irreducible Productions
>>>>> http://www.michael-gogins.com
>>>>> Michael dot Gogins at gmail dot com
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe
>>>>> csound"
>>>>>
>>>>>
>>>>>
>>>>
>>>> --
>>>> View this message in context:
>>>> http://old.nabble.com/compiling-with-msvc-and-libsndfile--tp29086722p29099876.html
>>>> Sent from the Csound - General mailing list archive at Nabble.com.
>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>>
>>>
>>> --
>>> Michael Gogins
>>> Irreducible Productions
>>> http://www.michael-gogins.com
>>> Michael dot Gogins at gmail dot com
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>>
>>
>>
>
> --
> View this message in context: http://old.nabble.com/compiling-with-msvc-and-libsndfile--tp29086722p29113875.html
> Sent from the Csound - General mailing list archive at Nabble.com.
>
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
--
Michael Gogins
Irreducible Productions
http://www.michael-gogins.com
Michael dot Gogins at gmail dot com
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|