Csound Csound-dev Csound-tekno Search About

[Csnd] Csound API Xcode linking error

Date2020-05-05 11:27
FromJ
Subject[Csnd] Csound API Xcode linking error
Hello,

After a long absence, I've been getting back into learning Csound, and I'm especially interested in exploring the API to integrate with things like openFrameworks, and I have a distant dream about making a Csound plug-in for TouchDesigner...


Compiles perfectly!

However, when I replace main.cpp with this example:

I get this error message:

Undefined symbols for architecture x86_64:

  "CsoundPerformanceThread::Play()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::Stop()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::CsoundPerformanceThread(Csound*)", referenced from:

      _main in main.o

  "CsoundPerformanceThread::~CsoundPerformanceThread()", referenced from:

      _main in main.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


Any clues? Seems like it's having trouble finding some functions, but not sure what to do to fix it.

I'm on Mac OS 10.13.6, Xcode 10.1. Latest Csound.

All the best,

Jeremy
--
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

Date2020-05-05 11:31
FromRory Walsh
SubjectRe: [Csnd] Csound API Xcode linking error
Add the CsoundPerformanceThread.cpp file to the project ;) That should do the trick. 

On Tue, 5 May 2020 at 11:27, J <falabala66@gmail.com> wrote:
Hello,

After a long absence, I've been getting back into learning Csound, and I'm especially interested in exploring the API to integrate with things like openFrameworks, and I have a distant dream about making a Csound plug-in for TouchDesigner...


Compiles perfectly!

However, when I replace main.cpp with this example:

I get this error message:

Undefined symbols for architecture x86_64:

  "CsoundPerformanceThread::Play()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::Stop()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::CsoundPerformanceThread(Csound*)", referenced from:

      _main in main.o

  "CsoundPerformanceThread::~CsoundPerformanceThread()", referenced from:

      _main in main.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


Any clues? Seems like it's having trouble finding some functions, but not sure what to do to fix it.

I'm on Mac OS 10.13.6, Xcode 10.1. Latest Csound.

All the best,

Jeremy
--
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
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

Date2020-05-05 11:37
FromJ
SubjectRe: [Csnd] Csound API Xcode linking error
Thank you Rory - where do I find this file, is it not in the CsoundLib64 framework? I notice there is a csPerfThread.hpp in the framework, is this different?

On Tue, May 5, 2020 at 11:32 AM Rory Walsh <rorywalsh@ear.ie> wrote:
Add the CsoundPerformanceThread.cpp file to the project ;) That should do the trick. 

On Tue, 5 May 2020 at 11:27, J <falabala66@gmail.com> wrote:
Hello,

After a long absence, I've been getting back into learning Csound, and I'm especially interested in exploring the API to integrate with things like openFrameworks, and I have a distant dream about making a Csound plug-in for TouchDesigner...


Compiles perfectly!

However, when I replace main.cpp with this example:

I get this error message:

Undefined symbols for architecture x86_64:

  "CsoundPerformanceThread::Play()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::Stop()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::CsoundPerformanceThread(Csound*)", referenced from:

      _main in main.o

  "CsoundPerformanceThread::~CsoundPerformanceThread()", referenced from:

      _main in main.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


Any clues? Seems like it's having trouble finding some functions, but not sure what to do to fix it.

I'm on Mac OS 10.13.6, Xcode 10.1. Latest Csound.

All the best,

Jeremy
--
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
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


--
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

Date2020-05-05 11:41
FromRory Walsh
SubjectRe: [Csnd] Csound API Xcode linking error
Sorry, I got the name wrong. But it looks like you found it anyway. They are available here:




On Tue, 5 May 2020 at 11:37, J <falabala66@gmail.com> wrote:
Thank you Rory - where do I find this file, is it not in the CsoundLib64 framework? I notice there is a csPerfThread.hpp in the framework, is this different?

On Tue, May 5, 2020 at 11:32 AM Rory Walsh <rorywalsh@ear.ie> wrote:
Add the CsoundPerformanceThread.cpp file to the project ;) That should do the trick. 

On Tue, 5 May 2020 at 11:27, J <falabala66@gmail.com> wrote:
Hello,

After a long absence, I've been getting back into learning Csound, and I'm especially interested in exploring the API to integrate with things like openFrameworks, and I have a distant dream about making a Csound plug-in for TouchDesigner...


Compiles perfectly!

However, when I replace main.cpp with this example:

I get this error message:

Undefined symbols for architecture x86_64:

  "CsoundPerformanceThread::Play()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::Stop()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::CsoundPerformanceThread(Csound*)", referenced from:

      _main in main.o

  "CsoundPerformanceThread::~CsoundPerformanceThread()", referenced from:

      _main in main.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


Any clues? Seems like it's having trouble finding some functions, but not sure what to do to fix it.

I'm on Mac OS 10.13.6, Xcode 10.1. Latest Csound.

All the best,

Jeremy
--
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
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


--
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
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

Date2020-05-05 12:17
FromJ
SubjectRe: [Csnd] Csound API Xcode linking error
Thank you Rory.

Down a rabbit hole of missing headers now! Will report back when I sort it.

But in the meantime, out of curiosity why didn't Xcode find this file in the header if it is included in the CsoundLib64.Framework? 

Jeremy

On Tue, May 5, 2020 at 11:42 AM Rory Walsh <rorywalsh@ear.ie> wrote:
Sorry, I got the name wrong. But it looks like you found it anyway. They are available here:




On Tue, 5 May 2020 at 11:37, J <falabala66@gmail.com> wrote:
Thank you Rory - where do I find this file, is it not in the CsoundLib64 framework? I notice there is a csPerfThread.hpp in the framework, is this different?

On Tue, May 5, 2020 at 11:32 AM Rory Walsh <rorywalsh@ear.ie> wrote:
Add the CsoundPerformanceThread.cpp file to the project ;) That should do the trick. 

On Tue, 5 May 2020 at 11:27, J <falabala66@gmail.com> wrote:
Hello,

After a long absence, I've been getting back into learning Csound, and I'm especially interested in exploring the API to integrate with things like openFrameworks, and I have a distant dream about making a Csound plug-in for TouchDesigner...


Compiles perfectly!

However, when I replace main.cpp with this example:

I get this error message:

Undefined symbols for architecture x86_64:

  "CsoundPerformanceThread::Play()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::Stop()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::CsoundPerformanceThread(Csound*)", referenced from:

      _main in main.o

  "CsoundPerformanceThread::~CsoundPerformanceThread()", referenced from:

      _main in main.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


Any clues? Seems like it's having trouble finding some functions, but not sure what to do to fix it.

I'm on Mac OS 10.13.6, Xcode 10.1. Latest Csound.

All the best,

Jeremy
--
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
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


--
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
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


--
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

Date2020-05-05 15:18
FromRory Walsh
SubjectRe: [Csnd] Csound API Xcode linking error
It may have found the header, but the header only includes the function prototypes. I don't think there is any reason the header couldn't include the implementation too, but I'm not the author of this interface. However, I have used it a lot, and once you include what needs including it works well. 

On Tue, 5 May 2020 at 12:18, J <falabala66@gmail.com> wrote:
Thank you Rory.

Down a rabbit hole of missing headers now! Will report back when I sort it.

But in the meantime, out of curiosity why didn't Xcode find this file in the header if it is included in the CsoundLib64.Framework? 

Jeremy

On Tue, May 5, 2020 at 11:42 AM Rory Walsh <rorywalsh@ear.ie> wrote:
Sorry, I got the name wrong. But it looks like you found it anyway. They are available here:




On Tue, 5 May 2020 at 11:37, J <falabala66@gmail.com> wrote:
Thank you Rory - where do I find this file, is it not in the CsoundLib64 framework? I notice there is a csPerfThread.hpp in the framework, is this different?

On Tue, May 5, 2020 at 11:32 AM Rory Walsh <rorywalsh@ear.ie> wrote:
Add the CsoundPerformanceThread.cpp file to the project ;) That should do the trick. 

On Tue, 5 May 2020 at 11:27, J <falabala66@gmail.com> wrote:
Hello,

After a long absence, I've been getting back into learning Csound, and I'm especially interested in exploring the API to integrate with things like openFrameworks, and I have a distant dream about making a Csound plug-in for TouchDesigner...


Compiles perfectly!

However, when I replace main.cpp with this example:

I get this error message:

Undefined symbols for architecture x86_64:

  "CsoundPerformanceThread::Play()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::Stop()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::CsoundPerformanceThread(Csound*)", referenced from:

      _main in main.o

  "CsoundPerformanceThread::~CsoundPerformanceThread()", referenced from:

      _main in main.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


Any clues? Seems like it's having trouble finding some functions, but not sure what to do to fix it.

I'm on Mac OS 10.13.6, Xcode 10.1. Latest Csound.

All the best,

Jeremy
--
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
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


--
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
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


--
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
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

Date2020-05-05 16:58
FromMichael Gogins
SubjectRe: [Csnd] Csound API Xcode linking error
Attachmentscsound_threaded.hpp  csound_threaded.cpp  
There is a newer and easier to use interface in csound/include: csound_threaded.hpp. This is a header-file-only facility. Just #include it and use it.

I attach this file and an example of its use.

Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, May 5, 2020 at 10:19 AM Rory Walsh <rorywalsh@ear.ie> wrote:
It may have found the header, but the header only includes the function prototypes. I don't think there is any reason the header couldn't include the implementation too, but I'm not the author of this interface. However, I have used it a lot, and once you include what needs including it works well. 

On Tue, 5 May 2020 at 12:18, J <falabala66@gmail.com> wrote:
Thank you Rory.

Down a rabbit hole of missing headers now! Will report back when I sort it.

But in the meantime, out of curiosity why didn't Xcode find this file in the header if it is included in the CsoundLib64.Framework? 

Jeremy

On Tue, May 5, 2020 at 11:42 AM Rory Walsh <rorywalsh@ear.ie> wrote:
Sorry, I got the name wrong. But it looks like you found it anyway. They are available here:




On Tue, 5 May 2020 at 11:37, J <falabala66@gmail.com> wrote:
Thank you Rory - where do I find this file, is it not in the CsoundLib64 framework? I notice there is a csPerfThread.hpp in the framework, is this different?

On Tue, May 5, 2020 at 11:32 AM Rory Walsh <rorywalsh@ear.ie> wrote:
Add the CsoundPerformanceThread.cpp file to the project ;) That should do the trick. 

On Tue, 5 May 2020 at 11:27, J <falabala66@gmail.com> wrote:
Hello,

After a long absence, I've been getting back into learning Csound, and I'm especially interested in exploring the API to integrate with things like openFrameworks, and I have a distant dream about making a Csound plug-in for TouchDesigner...


Compiles perfectly!

However, when I replace main.cpp with this example:

I get this error message:

Undefined symbols for architecture x86_64:

  "CsoundPerformanceThread::Play()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::Stop()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::CsoundPerformanceThread(Csound*)", referenced from:

      _main in main.o

  "CsoundPerformanceThread::~CsoundPerformanceThread()", referenced from:

      _main in main.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


Any clues? Seems like it's having trouble finding some functions, but not sure what to do to fix it.

I'm on Mac OS 10.13.6, Xcode 10.1. Latest Csound.

All the best,

Jeremy
--
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
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


--
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
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


--
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
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
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

Date2020-05-06 11:21
FromJ
SubjectRe: [Csnd] Csound API Xcode linking error
Thank you Michael,

This is really helpful. I'm quite used to C/C++ code structures from lots of microcontroller programming, but when it comes to IDEs and dependencies I find myself struggling with headers/frameworks/linking etc rather than the code itself.

The Csound API seems quite clear in its implementation and really flexible so I'll crack on with it!

Jeremy

On Tue, May 5, 2020 at 4:59 PM Michael Gogins <michael.gogins@gmail.com> wrote:
There is a newer and easier to use interface in csound/include: csound_threaded.hpp. This is a header-file-only facility. Just #include it and use it.

I attach this file and an example of its use.

Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, May 5, 2020 at 10:19 AM Rory Walsh <rorywalsh@ear.ie> wrote:
It may have found the header, but the header only includes the function prototypes. I don't think there is any reason the header couldn't include the implementation too, but I'm not the author of this interface. However, I have used it a lot, and once you include what needs including it works well. 

On Tue, 5 May 2020 at 12:18, J <falabala66@gmail.com> wrote:
Thank you Rory.

Down a rabbit hole of missing headers now! Will report back when I sort it.

But in the meantime, out of curiosity why didn't Xcode find this file in the header if it is included in the CsoundLib64.Framework? 

Jeremy

On Tue, May 5, 2020 at 11:42 AM Rory Walsh <rorywalsh@ear.ie> wrote:
Sorry, I got the name wrong. But it looks like you found it anyway. They are available here:




On Tue, 5 May 2020 at 11:37, J <falabala66@gmail.com> wrote:
Thank you Rory - where do I find this file, is it not in the CsoundLib64 framework? I notice there is a csPerfThread.hpp in the framework, is this different?

On Tue, May 5, 2020 at 11:32 AM Rory Walsh <rorywalsh@ear.ie> wrote:
Add the CsoundPerformanceThread.cpp file to the project ;) That should do the trick. 

On Tue, 5 May 2020 at 11:27, J <falabala66@gmail.com> wrote:
Hello,

After a long absence, I've been getting back into learning Csound, and I'm especially interested in exploring the API to integrate with things like openFrameworks, and I have a distant dream about making a Csound plug-in for TouchDesigner...


Compiles perfectly!

However, when I replace main.cpp with this example:

I get this error message:

Undefined symbols for architecture x86_64:

  "CsoundPerformanceThread::Play()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::Stop()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::CsoundPerformanceThread(Csound*)", referenced from:

      _main in main.o

  "CsoundPerformanceThread::~CsoundPerformanceThread()", referenced from:

      _main in main.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


Any clues? Seems like it's having trouble finding some functions, but not sure what to do to fix it.

I'm on Mac OS 10.13.6, Xcode 10.1. Latest Csound.

All the best,

Jeremy
--
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
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


--
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
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


--
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
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
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


--
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

Date2020-05-06 11:31
FromRory Walsh
SubjectRe: [Csnd] Csound API Xcode linking error
For what it's worth, this can all be done from the terminal on macos. You don't need Xcode...

On Wed, 6 May 2020 at 11:21, J <falabala66@gmail.com> wrote:
Thank you Michael,

This is really helpful. I'm quite used to C/C++ code structures from lots of microcontroller programming, but when it comes to IDEs and dependencies I find myself struggling with headers/frameworks/linking etc rather than the code itself.

The Csound API seems quite clear in its implementation and really flexible so I'll crack on with it!

Jeremy

On Tue, May 5, 2020 at 4:59 PM Michael Gogins <michael.gogins@gmail.com> wrote:
There is a newer and easier to use interface in csound/include: csound_threaded.hpp. This is a header-file-only facility. Just #include it and use it.

I attach this file and an example of its use.

Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, May 5, 2020 at 10:19 AM Rory Walsh <rorywalsh@ear.ie> wrote:
It may have found the header, but the header only includes the function prototypes. I don't think there is any reason the header couldn't include the implementation too, but I'm not the author of this interface. However, I have used it a lot, and once you include what needs including it works well. 

On Tue, 5 May 2020 at 12:18, J <falabala66@gmail.com> wrote:
Thank you Rory.

Down a rabbit hole of missing headers now! Will report back when I sort it.

But in the meantime, out of curiosity why didn't Xcode find this file in the header if it is included in the CsoundLib64.Framework? 

Jeremy

On Tue, May 5, 2020 at 11:42 AM Rory Walsh <rorywalsh@ear.ie> wrote:
Sorry, I got the name wrong. But it looks like you found it anyway. They are available here:




On Tue, 5 May 2020 at 11:37, J <falabala66@gmail.com> wrote:
Thank you Rory - where do I find this file, is it not in the CsoundLib64 framework? I notice there is a csPerfThread.hpp in the framework, is this different?

On Tue, May 5, 2020 at 11:32 AM Rory Walsh <rorywalsh@ear.ie> wrote:
Add the CsoundPerformanceThread.cpp file to the project ;) That should do the trick. 

On Tue, 5 May 2020 at 11:27, J <falabala66@gmail.com> wrote:
Hello,

After a long absence, I've been getting back into learning Csound, and I'm especially interested in exploring the API to integrate with things like openFrameworks, and I have a distant dream about making a Csound plug-in for TouchDesigner...


Compiles perfectly!

However, when I replace main.cpp with this example:

I get this error message:

Undefined symbols for architecture x86_64:

  "CsoundPerformanceThread::Play()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::Stop()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::CsoundPerformanceThread(Csound*)", referenced from:

      _main in main.o

  "CsoundPerformanceThread::~CsoundPerformanceThread()", referenced from:

      _main in main.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


Any clues? Seems like it's having trouble finding some functions, but not sure what to do to fix it.

I'm on Mac OS 10.13.6, Xcode 10.1. Latest Csound.

All the best,

Jeremy
--
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
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


--
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
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


--
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
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
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


--
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
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

Date2020-05-06 11:49
FromJ
SubjectRe: [Csnd] Csound API Xcode linking error
Yes, of course, I may go with the IDE free compiler option - I'm still in the early days of developing a kind of workflow for this.

As I mentioned the far future end goal of this is to develop a plugin for TouchDesigner that can run/control/get audio from/to Csound - I'm imagining for that kind of project an IDE might be worth the short term hassle, but I'm sure I'll have more questions on all of this going forward :)

On Wed, May 6, 2020 at 11:32 AM Rory Walsh <rorywalsh@ear.ie> wrote:
For what it's worth, this can all be done from the terminal on macos. You don't need Xcode...

On Wed, 6 May 2020 at 11:21, J <falabala66@gmail.com> wrote:
Thank you Michael,

This is really helpful. I'm quite used to C/C++ code structures from lots of microcontroller programming, but when it comes to IDEs and dependencies I find myself struggling with headers/frameworks/linking etc rather than the code itself.

The Csound API seems quite clear in its implementation and really flexible so I'll crack on with it!

Jeremy

On Tue, May 5, 2020 at 4:59 PM Michael Gogins <michael.gogins@gmail.com> wrote:
There is a newer and easier to use interface in csound/include: csound_threaded.hpp. This is a header-file-only facility. Just #include it and use it.

I attach this file and an example of its use.

Regards,
Mike

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, May 5, 2020 at 10:19 AM Rory Walsh <rorywalsh@ear.ie> wrote:
It may have found the header, but the header only includes the function prototypes. I don't think there is any reason the header couldn't include the implementation too, but I'm not the author of this interface. However, I have used it a lot, and once you include what needs including it works well. 

On Tue, 5 May 2020 at 12:18, J <falabala66@gmail.com> wrote:
Thank you Rory.

Down a rabbit hole of missing headers now! Will report back when I sort it.

But in the meantime, out of curiosity why didn't Xcode find this file in the header if it is included in the CsoundLib64.Framework? 

Jeremy

On Tue, May 5, 2020 at 11:42 AM Rory Walsh <rorywalsh@ear.ie> wrote:
Sorry, I got the name wrong. But it looks like you found it anyway. They are available here:




On Tue, 5 May 2020 at 11:37, J <falabala66@gmail.com> wrote:
Thank you Rory - where do I find this file, is it not in the CsoundLib64 framework? I notice there is a csPerfThread.hpp in the framework, is this different?

On Tue, May 5, 2020 at 11:32 AM Rory Walsh <rorywalsh@ear.ie> wrote:
Add the CsoundPerformanceThread.cpp file to the project ;) That should do the trick. 

On Tue, 5 May 2020 at 11:27, J <falabala66@gmail.com> wrote:
Hello,

After a long absence, I've been getting back into learning Csound, and I'm especially interested in exploring the API to integrate with things like openFrameworks, and I have a distant dream about making a Csound plug-in for TouchDesigner...


Compiles perfectly!

However, when I replace main.cpp with this example:

I get this error message:

Undefined symbols for architecture x86_64:

  "CsoundPerformanceThread::Play()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::Stop()", referenced from:

      _main in main.o

  "CsoundPerformanceThread::CsoundPerformanceThread(Csound*)", referenced from:

      _main in main.o

  "CsoundPerformanceThread::~CsoundPerformanceThread()", referenced from:

      _main in main.o

ld: symbol(s) not found for architecture x86_64

clang: error: linker command failed with exit code 1 (use -v to see invocation)


Any clues? Seems like it's having trouble finding some functions, but not sure what to do to fix it.

I'm on Mac OS 10.13.6, Xcode 10.1. Latest Csound.

All the best,

Jeremy
--
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
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


--
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
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


--
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
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
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


--
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
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


--
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