[Cs-dev] API. Compilation with interface library
Date | 2012-09-24 17:00 |
From | obaudouin |
Subject | [Cs-dev] API. Compilation with interface library |
Dear Csounders, I try to compile a single cpp file but I get an error ("CppSound.hpp not found"; but the file exists). Could you help me please? I have probably forgotten something... COMMAND LINE (from Rory Walsh, Developing Audio Software with the Csound Host API): g++ cstestapi.cpp -o testapi "/home/olivier/paquetages/Csound5.18.02/interfaces/csPerfThread.cpp" -I"/home/olivier/paquetages/Csound5.18.02/H" -L"/home/olivier/paquetages/Csound5.18.02" -lcsound64 ERROR MESSAGE: cstestapi.cpp:1:24: erreur fatale: *CppSound.hpp : Aucun fichier ou dossier de ce type* compilation terminée. FILE "cstestapi.cpp" (in path "/home/olivier/scripts") #include "CppSound.hpp" #include "csPerfThread.hpp" #include |
Date | 2012-09-24 17:42 |
From | Rory Walsh |
Subject | Re: [Cs-dev] API. Compilation with interface library |
Try -I "/home/olivier/paquetages/Csound5.18.02/interfaces" CppSound lives there if you are working from your own build of Csound. If you are using one of the Linux installer then it should live in /usr/local/include/Csound I think? On 24 September 2012 17:00, obaudouin |
Date | 2012-09-24 19:31 |
From | obaudouin |
Subject | Re: [Cs-dev] API. Compilation with interface library |
Thank you Rory. I tried: g++ cstestapi.cpp -o %1 -I"/home/olivier/paquetages/Csound5.18.02/H" -I"/home/olivier/paquetages/Csound5.18.02/interfaces" -L"/home/olivier/paquetages/Csound5.18.02/" -lcsound64 Now, I get another error: /tmp/cccpQQGP.o: In function `main': cstestapi.cpp:(.text+0x71): undefined reference to `CsoundFile::setCSD(std::string)' cstestapi.cpp:(.text+0x90): undefined reference to `CsoundFile::exportForPerformance() const' cstestapi.cpp:(.text+0x9f): undefined reference to `CppSound::compile()' cstestapi.cpp:(.text+0xae): undefined reference to `CppSound::getCsound()' cstestapi.cpp:(.text+0xc3): undefined reference to `CsoundPerformanceThread::CsoundPerformanceThread(CSOUND_*)' (...) ----- Olivier Baudouin, PhD http://olivierbaudouin.com MINT-OMF Paris-Sorbonne -- View this message in context: http://csound.1045644.n5.nabble.com/API-Compilation-with-interface-library-tp5716105p5716115.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-09-25 01:45 |
From | Rory Walsh |
Subject | Re: [Cs-dev] API. Compilation with interface library |
Attachments | None None |
In my understanding of things it looks like whatever library you are linking against does not contain the jazz you're looking for. In the world of Rory it would appear that you need to link to csnd.so or something like that. The "CsoundFile" functions you are trying to access are not part of the csound64 library. |
Date | 2012-09-25 08:17 |
From | obaudouin |
Subject | Re: [Cs-dev] API. Compilation with interface library |
OK. That is better with the command line below. But I get a library error that I do not succeed to do. COMMAND LINE: g++ cstestapi.cpp -o testapi -I"/home/olivier/paquetages/Csound5.18.02/H" -I"/home/olivier/paquetages/Csound5.18.02/interfaces" -L"/home/olivier/paquetages/Csound5.18.02/" -lcsound64 -lcsnd ERROR MESSAGE: /usr/bin/ld: /home/olivier/paquetages/Csound5.18.02//libcsound64.a(fout.o): undefined reference to symbol 'sf_readf_double@@libsndfile.so.1.0' /usr/bin/ld: note: 'sf_readf_double@@libsndfile.so.1.0' is defined in DSO /lib64/libsndfile.so.1 so try adding it to the linker command line /lib64/libsndfile.so.1: could not read symbols: Invalid operation collect2: erreur: ld a retourné 1 code d'état d'exécution AT CSOUND COMPILATION: Checking for C library sndfile... yes Checking for libsndfile version 1.0.19 or later... yes ----- Olivier Baudouin, PhD http://olivierbaudouin.com MINT-OMF Paris-Sorbonne -- View this message in context: http://csound.1045644.n5.nabble.com/API-Compilation-with-interface-library-tp5716105p5716131.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net https://li |
Date | 2012-09-25 10:17 |
From | Rory Walsh |
Subject | Re: [Cs-dev] API. Compilation with interface library |
My usual linker options on Linux are -lcsound64 -lm -lsndfile The -lsndfile should sort the most recent problem you are having. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-09-25 10:18 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] API. Compilation with interface library |
On 25 Sep 2012, at 08:17, obaudouin wrote: > OK. That is better with the command line below. But I get a library error > that I do not succeed to do. > > COMMAND LINE: > > g++ cstestapi.cpp -o testapi -I"/home/olivier/paquetages/Csound5.18.02/H" > -I"/home/olivier/paquetages/Csound5.18.02/interfaces" > -L"/home/olivier/paquetages/Csound5.18.02/" -lcsound64 -lcsnd > > ERROR MESSAGE: > > /usr/bin/ld: /home/olivier/paquetages/Csound5.18.02//libcsound64.a(fout.o): > undefined reference to symbol 'sf_readf_double@@libsndfile.so.1.0' > /usr/bin/ld: note: 'sf_readf_double@@libsndfile.so.1.0' is defined in DSO > /lib64/libsndfile.so.1 so try adding it to the linker command line > /lib64/libsndfile.so.1: could not read symbols: Invalid operation > collect2: erreur: ld a retourné 1 code d'état d'exécution > -lsndfile is needed. > AT CSOUND COMPILATION: > > Checking for C library sndfile... yes > Checking for libsndfile version 1.0.19 or later... yes > > > > > ----- > > Olivier Baudouin, PhD > http://olivierbaudouin.com > MINT-OMF > Paris-Sorbonne > > -- > View this message in context: http://csound.1045644.n5.nabble.com/API-Compilation-with-interface-library-tp5716105p5716131.html > Sent from the Csound - Dev mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-09-25 10:51 |
From | obaudouin |
Subject | Re: [Cs-dev] API. Compilation with interface library |
Compilation is OK with: g++ cstestapi.cpp -o testapi -I"/home/olivier/paquetages/Csound5.18.02/H" -I"/home/olivier/paquetages/Csound5.18.02/interfaces" -L"/home/olivier/paquetages/Csound5.18.02/" -lcsound64 -lcsnd -lsndfile -lpthread -lgomp -ldl I don't know why I have to add "-lsndfile -lpthread -lgomp -ldl"... but it works! NOW: ERROR AT EXECUTION, libcsnd not found... ./testapi: error while loading shared libraries: libcsnd.so.5.2: cannot open shared object file: No such file or directory ----- Olivier Baudouin, PhD http://olivierbaudouin.com MINT-OMF Paris-Sorbonne -- View this message in context: http://csound.1045644.n5.nabble.com/API-Compilation-with-interface-library-tp5716105p5716135.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-09-25 10:58 |
From | Rory Walsh |
Subject | Re: [Cs-dev] API. Compilation with interface library |
When you built Csound did you add the buildInterfaces=1 option? On 25 September 2012 10:51, obaudouin |
Date | 2012-09-25 11:00 |
From | obaudouin |
Subject | Re: [Cs-dev] API. Compilation with interface library |
Yes, of course: scons useDouble=1 usePortMIDI=0 buildRelease=1 Word64=1 Lib64=1 useCoreAudio=0 useOpenMP=1 buildInterfaces=1 includeSerial=1 noDebug=1 ----- Olivier Baudouin, PhD http://olivierbaudouin.com MINT-OMF Paris-Sorbonne -- View this message in context: http://csound.1045644.n5.nabble.com/API-Compilation-with-interface-library-tp5716105p5716137.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-09-25 12:53 |
From | Victor Lazzarini |
Subject | Re: [Cs-dev] API. Compilation with interface library |
The library is there, since you've built your program. It's just no in the search path for .so. Try installing it in /usr/local/lib and running ldconfig afterwards. Victor On 25 Sep 2012, at 10:51, obaudouin wrote: > Compilation is OK with: > > g++ cstestapi.cpp -o testapi -I"/home/olivier/paquetages/Csound5.18.02/H" > -I"/home/olivier/paquetages/Csound5.18.02/interfaces" > -L"/home/olivier/paquetages/Csound5.18.02/" -lcsound64 -lcsnd -lsndfile > -lpthread -lgomp -ldl > > I don't know why I have to add "-lsndfile -lpthread -lgomp -ldl"... but it > works! > > NOW: ERROR AT EXECUTION, libcsnd not found... > > ./testapi: error while loading shared libraries: libcsnd.so.5.2: cannot open > shared object file: No such file or directory > > > > > ----- > > Olivier Baudouin, PhD > http://olivierbaudouin.com > MINT-OMF > Paris-Sorbonne > > -- > View this message in context: http://csound.1045644.n5.nabble.com/API-Compilation-with-interface-library-tp5716105p5716135.html > Sent from the Csound - Dev mailing list archive at Nabble.com. > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > _______________________________________________ > Csound-devel mailing list > Csound-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/csound-devel Dr Victor Lazzarini Senior Lecturer Dept. of Music NUI Maynooth Ireland tel.: +353 1 708 3545 Victor dot Lazzarini AT nuim dot ie ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |
Date | 2012-09-25 13:07 |
From | obaudouin |
Subject | Re: [Cs-dev] API. Compilation with interface library |
That works when I put a symbolic link to libcsnd.so.5.2 into the /usr/lib64 folder. Merci beaucoup ! Olivier. ----- Olivier Baudouin, PhD http://olivierbaudouin.com MINT-OMF Paris-Sorbonne -- View this message in context: http://csound.1045644.n5.nabble.com/API-Compilation-with-interface-library-tp5716105p5716141.html Sent from the Csound - Dev mailing list archive at Nabble.com. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Csound-devel mailing list Csound-devel@lists.sourceforge.net |