[Csnd] Csound API C++ examples
Date | 2020-05-06 22:06 |
From | sjakops |
Subject | [Csnd] Csound API C++ examples |
Hello, can someone please help me get up and running with the C++ examples on Windows with mingw - I am trying to build an example with the command g++ SimpleCsdPlayback.cpp -o main.exe -L "C:\Program Files\Csound6_x64\lib" -I "C:\Program Files\Csound6_x64\include\csound" -l csound64 .. but minggw responds with a lot of lines like these: c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\user\AppData\Local\Temp\ccHlJyC c.o:SimpleCsdPlayback.cpp:(.text$_ZNK6Csound14GetSpoutSampleEii[__ZNK6Csound14GetSpoutSampleEii]+0x21): undefi ned reference to `csoundGetSpoutSample' c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: C:\Users\user\AppData\Local\Temp\ccHlJyC c.o:SimpleCsdPlayback.cpp:(.text$_ZN6Csound12GetInputNameEv[__ZN6Csound12GetInputNameEv]+0x13): undefined refe rence to `csoundGetInputName' -- Sent from: http://csound.1045644.n5.nabble.com/Csound-General-f1093014.html Csound mailing list Csound@listserv.heanet.ie https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here |
Date | 2020-05-06 22:14 |
From | Hlöðver Sigurðsson |
Subject | Re: [Csnd] Csound API C++ examples |
csoundGetInputName is defined in csound.h and should be linked in libcsound64. Are you sure about your linker path "C:\Program Files\Csound6_x64\lib" ? On Wed, 6 May 2020 at 23:06, sjakops <sorenkj@gmail.com> wrote: Hello, can someone please help me get up and running with the C++ examples on |
Date | 2020-05-06 22:40 |
From | Søren Jakobsen |
Subject | Re: [Csnd] Csound API C++ examples |
Yes - if I specify any other path I will get the message c:/mingw/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: cannot find -lcsound64 On 5/6/20, Hlöðver Sigurðsson |
Date | 2020-05-06 22:54 |
From | Hlöðver Sigurðsson |
Subject | Re: [Csnd] Csound API C++ examples |
This could be something deeper than I expect. But I replied because I've been working with the api function csoundGetInputName all night now. Can you analyze the libcsound64.dll file with something like http://www.dependencywalker.com/ and see if csoundGetInputName is definitely defined in it? And if so, could you try some other linker? So just compile with g++ using the -c flag and pick some ld.exe which seems to be part of the minigw environment which you're in. On Wed, 6 May 2020 at 23:40, Søren Jakobsen <sorenkj@gmail.com> wrote: Yes - if I specify any other path I will get the message |
Date | 2020-05-06 23:20 |
From | Søren Jakobsen |
Subject | Re: [Csnd] Csound API C++ examples |
Are you using Visual Studio? Perhaps the csound64.lib doesn't work with Mingw because it was created with Visual Studio.. it read that in the past Mingw would only accept .a files, but also read that it should support .lib files now. I don't think I have any other linker on my machine (haven't been able to download Visual Studio). It seems that it is all functions of csound64.dll that are undefined, but I haven't changed anything in this file, so they really ought to be defined..? On 5/6/20, Hlöðver Sigurðsson |
Date | 2020-05-06 23:34 |
From | Hlöðver Sigurðsson |
Subject | Re: [Csnd] Csound API C++ examples |
they ought to be defined yes. I've used Visual Studio in the past compiling csound and supercollider, and it's much easier for minigw to run VS compiled binaries than vice versa, but that's just my experience and I've heard opposite experiences. You have full access to gnu's gcc toolkit, so I don't see how this shouldn't be solve-able. You have ldd which you can use to analyze how csound64.dll is linked. Btw, csound64.lib isn't a binary file, but just a textfile describing a dynamically linked library binary. So you have to make sure you have both csound64.lib and csound64.dll. If the symbols of csound64.dll are really undefined, then you have a broken dll file. I compiled csound dynamically for windows last year https://github.com/panaeolus/libcsound64/tree/master/native/libcsound64/windows/x86_64 you could test if this works better than the current csound release, I'm 100% sure that everything's there because I used it in workshops on many different computers. On Thu, 7 May 2020 at 00:20, Søren Jakobsen <sorenkj@gmail.com> wrote: Are you using Visual Studio? Perhaps the csound64.lib doesn't work |
Date | 2020-05-07 09:12 |
From | Rory Walsh |
Subject | Re: [Csnd] Csound API C++ examples |
You should be using mingw64. To set up a proper mingw64 working environment you should download and install msys2 Note that it would be far simpler to use Visual Studio Express. But you say you have problems downloading this? msys2 is a fairly hefty download too. On Wed, 6 May 2020 at 23:34, Hlöðver Sigurðsson <hlolli@gmail.com> wrote:
|
Date | 2020-05-07 09:39 |
From | Søren Jakobsen |
Subject | Re: [Csnd] Csound API C++ examples |
Ok! Being a C++ novice I guess I will go with the simpler VS Express solution. Am currently corona-stuck on an island with poor phone-Internet, but will go hunting for a better connection. Thank you both for the help. Best regards, Søren On 5/7/20, Rory Walsh |