[Csnd-dev] Invalid Char** to Const Char** - Csound64 6.11, MingW, Code Blocks
Date | 2018-06-23 14:49 |
From | Ephesian <000003af25e6c9be-dmarc-request@LISTSERV.HEANET.IE> |
Subject | [Csnd-dev] Invalid Char** to Const Char** - Csound64 6.11, MingW, Code Blocks |
Greetings, Recently I've taken an interest in learning C++ coding with CSound6.11 (x64). I've started following the CSound Floss Manual at http://write.flossmanuals.net/csound/preface/ ... ... particularly the section THE CSOUND API in chapter 12. I'm using MinGW along with Code::Blocks to do my compiling. I've included the CSOUND.HPP C++ wrapper in the project's search directory list.I've also added the path to the link library csound64.lib Please note, i'm relativly new to C++ programming so be patient with me if I've overlooked something completely obvious to any one reading this. Also if I'm posting in the wrong forum please direct me to the correct one. The first example in the API section is written in C but then is followed up by the C++ equivalent: 1 #include |
Date | 2018-06-23 15:16 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] Invalid Char** to Const Char** - Csound64 6.11, MingW, Code Blocks |
main() should be defined with const char** instead. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy Maynooth University Ireland > On 23 Jun 2018, at 15:00, Ephesian <000003af25e6c9be-dmarc-request@LISTSERV.HEANET.IE> wrote: > > Greetings, > > Recently I've taken an interest in learning C++ coding with CSound6.11 (x64). I've started following the CSound Floss Manual at http://write.flossmanuals.net/csound/preface/ ... ... particularly the section THE CSOUND API in chapter 12. I'm using MinGW along with Code::Blocks to do my compiling. I've included the CSOUND.HPP C++ wrapper in the project's search directory list.I've also added the path to the link library csound64.lib > > Please note, i'm relativly new to C++ programming so be patient with me if I've overlooked something completely obvious to any one reading this. Also if I'm posting in the wrong forum please direct me to the correct one. > > The first example in the API section is written in C but then is followed up by the C++ equivalent: > > 1 #include |
Date | 2018-06-23 15:55 |
From | jpff |
Subject | Re: [Csnd-dev] Invalid Char** to Const Char** - Csound64 6.11, MingW, Code Blocks |
To do withvetsions of C++ i think. try adding const before char** on line 3 It is valid C but C++ has other ideas, ==John ff On Sat, 23 Jun 2018, Ephesian wrote: > Greetings, > > Recently I've taken an interest in learning C++ coding with CSound6.11 (x64). I've started following the CSound Floss Manual at http://write.flossmanuals.net/csound/preface/ ... ... particularly the section THE CSOUND API in chapter 12. I'm using MinGW along with Code::Blocks to do my compiling. I've included the CSOUND.HPP C++ wrapper in the project's search directory list.I've also added the path to the link library csound64.lib > > Please note, i'm relativly new to C++ programming so be patient with me if I've overlooked something completely obvious to any one reading this. Also if I'm posting in the wrong forum please direct me to the correct one. > > The first example in the API section is written in C but then is followed up by the C++ equivalent: > > 1 #include |
Date | 2018-06-25 20:02 |
From | Ephesian <000003af25e6c9be-dmarc-request@LISTSERV.HEANET.IE> |
Subject | Re: [Csnd-dev] Invalid Char** to Const Char** - Csound64 6.11, MingW, Code Blocks |
Thank You jpff and Victor Lazzarini for your replies. So I've changed the code to: int main(int argc, *const* char **argv) Now when building I get: obj\Release\csoundtest.o:csoundtest.cpp:(.text$_ZN6Csound7CompileEPKcS1_S1_S1_S1_[__ZN6Csound7CompileEPKcS1_S1_S1_S1_]+0x52)||undefined reference to `csoundCompile'| I'm thinking it's because I don't know enough about how CSound and C++ work together. I need a good modern tutorial with simple examples that build from the ground up, explaining everything step by step. One thing to note, is all I did was copy and paste the code from the tutorial. I'm wondering if this new error is occurring because I don't yet have and Orchestra and a Score defined yet. Thank you all. -- |
Date | 2018-06-25 21:14 |
From | Victor Lazzarini |
Subject | Re: [Csnd-dev] Invalid Char** to Const Char** - Csound64 6.11, MingW, Code Blocks |
That’s just an undefined reference because you are not probably passing the Csound library at link time. The program depends on that. ======================== Prof. Victor Lazzarini Dean of Arts, Celtic Studies, and Philosophy, Maynooth University, Maynooth, Co Kildare, Ireland Tel: 00 353 7086936 Fax: 00 353 1 7086952 > On 25 Jun 2018, at 20:02, Ephesian <000003af25e6c9be-dmarc-request@LISTSERV.HEANET.IE> wrote: > > Thank You jpff and Victor Lazzarini for your replies. > So I've changed the code to: > > int main(int argc, *const* char **argv) > > Now when building I get: > obj\Release\csoundtest.o:csoundtest.cpp:(.text$_ZN6Csound7CompileEPKcS1_S1_S1_S1_[__ZN6Csound7CompileEPKcS1_S1_S1_S1_]+0x52)||undefined > reference to `csoundCompile'| > > I'm thinking it's because I don't know enough about how CSound and C++ work > together. I need a good modern tutorial with simple examples that build from > the ground up, explaining everything step by step. > > One thing to note, is all I did was copy and paste the code from the > tutorial. I'm wondering if this new error is occurring because I don't yet > have and Orchestra and a Score defined yet. > > Thank you all. > > > > -- > Sent from: http:// |
Date | 2018-06-25 21:21 |
From | Guillermo Senna |
Subject | Re: [Csnd-dev] Invalid Char** to Const Char** - Csound64 6.11, MingW, Code Blocks |
Hi, This is a good list of recommended books for learning C++: https://stackoverflow.com/questions/388242/the-definitive-c-book-guide-and-list Cheers. On 25/06/18 16:02, Ephesian wrote: > Thank You jpff and Victor Lazzarini for your replies. > So I've changed the code to: > > int main(int argc, *const* char **argv) > > Now when building I get: > obj\Release\csoundtest.o:csoundtest.cpp:(.text$_ZN6Csound7CompileEPKcS1_S1_S1_S1_[__ZN6Csound7CompileEPKcS1_S1_S1_S1_]+0x52)||undefined > reference to `csoundCompile'| > > I'm thinking it's because I don't know enough about how CSound and C++ work > together. I need a good modern tutorial with simple examples that build from > the ground up, explaining everything step by step. > > One thing to note, is all I did was copy and paste the code from the > tutorial. I'm wondering if this new error is occurring because I don't yet > have and Orchestra and a Score defined yet. > > Thank you all. > > > > -- |