Re: [Csnd] [EXTERNAL] [Csnd] VS header file issue

Re the API threading example:

I added csPerfThread.cpp, and it solved the linker issue and gave me some new messages: an error, saying strcpy (if I remember correctly) was unsafe and needed to be changed to strcpy_s. Also some warnings about conversions.

I looked for csnd.lib, I did a search on my C:\Program Files\Csound6_x64\lib directory and found csound64.lib, libcsound64.lib and CsoundQt-d-html-cs6.lib.

I searched my csound-6.15.0 source code directory and found no lib files

Did a google search on “csnd.lib”, didn’t find anything.

Went to GitHub - csound/csound: Main repository for Csound. I’m not totally familiar with how it works, but I used the file finder and searched for csnd.lib and found nothing, then searched for *.lib and found nothing.

I imagine I missed csnd.lib somewhere. Where can it get it?

The strncpy is not an error I think, just a warning, you can ignore it.

As csnd.lib, you should have at least a csnd.dll somewhere. It comes with Csound. If you don’t, try installing the latest Csound.

The csnd.dll is the link library containing that code.

Prof. Victor Lazzarini
Maynooth University
Ireland

Actually the DLL is called csnd6.dll. Not sure if there is a csnd6.lib, but you would need that to link to it.

Maybe someone with a windows machine can make you a csnd6.lib from the DLL, if there is not one.

Steps for this are (command-line):

1. Export the symbols

dumpbin /EXPORTS csnd6.dll > csnd6.exports

2. Create a DEF file with a line at the top

EXPORTS

followed by the contents of csnd6.exports

2. Create a lib file (for this you need to have the VC\/bin directory in your PATH

lib /def:csnd6.def /machine:x64 /out:csnd6.lib

(source: c++ - How to make a .lib file when have a .dll file and a header file - Stack Overflow)

Also on the strcpy issue, if you are getting an error you can try adding

_CRT_SECURE_NO_WARNINGS

and

_CRT_SECURE_NO_DEPRECATE

to your preprocessor definitions (in the properties under C/C++ and preprocessor).

That should allow you to use csPerfThread.cpp directly without needing the compiled library