[Csnd] Plugin development questions
Date | 2013-08-03 13:09 |
From | SimonKenny |
Subject | [Csnd] Plugin development questions |
Hi I'm working on a Leap Motion (http://leapmotion.com) plugin for Csound. I have a few questions about issues I'm having and I would be very grateful for any help anyone would have. Firstly, the latest version of my plugin builds on OSX using the Xcode system for Csound 5.2 and works fine when included at runtime via the --opcode-lib flag. However when I updated the system to Csound 6, I can build the plugin with the new headers and dylib library, but I get a API version mismatch error when I include at runtime. It's giving me version (2.6/3.0) mismatch. I checked that the API version in the new version.h file was 3.0 and it is. I even changed this value to 2.6 in version.h, rebuilt to check it Csound 6 is expecting the wrong API level for some reason. Strangely it doesn't give an error when included, it seems to just skip it entirely. Any idea what I'm doing wrong? Also note that I completely removed Csound 5.2 so the new installation was clean. Secondly, I've never been able to get it working on a Windows system. I was able to build my plugin, using the pthread-win32 library as a pthread substitute (I notice Csound comes with the GCC pthread-win32 dll on Windows so this must be what you use too). However I get a system hang after "Loading command-line libraries:" stdout message. I investigated using the Dr. Memory tool but don't really know how to interpret the results. In case anyone does know I can post the log file, which has lots of "uninitialized read" errors with call traces. Here's an example: Error #39: UNINITIALIZED READ: reading 0x0028f6d1-0x0028f6d8 7 byte(s) within 0x0028f6d0-0x0028f6d8 # 0 Leap.dll!Leap::Listener::onDisconnect +0x1a326 (0x50b6b436 |
Date | 2013-08-03 13:45 |
From | Michael Gogins |
Subject | Re: [Csnd] Plugin development questions |
Are you writing in C or C++? If C++, the vendor and version of the compiler must be the same for all C++ components (C mixes and matches much better). GCC, if that's what you're using, comes in four different models on WIndows, setjump-longjump exception handling vs dwarf2 exception handling, and then also Windows threads vs Posix threads. Oh, and there's 32 bit vs64 bit architecture.
Assuming you're using 32 bit architecture, you WILL have problems if one part uses sjlj and the other dw2, and you MAY have problems if one part uses Posix threads and the other Win32 threads.
The pthread-win32 library itself may be a problem. Recently the type of pthread_t itself changed (was two words in size, now is one word in size). =========================== Michael GoginsIrreducible Productions http://michaelgogins.tumblr.com Michael dot Gogins at gmail dot com On Sat, Aug 3, 2013 at 8:09 AM, SimonKenny <digithree@gmail.com> wrote: Hi |
Date | 2013-08-03 17:03 |
From | Victor Lazzarini |
Subject | Re: [Csnd] Plugin development questions |
The plugin version comes solely from the CsoundLib headers (there is no linkage involved), so it is a matter of making sure you are using the correct headers. It does look like you might have the wrong header included. You can simplify the build by doing it from the command-line: g++ -O3 -dynamiclib -o opcode.dylib yourcode.cpp -DUSE_DOUBLE -I |
Date | 2013-08-05 21:50 |
From | SimonKenny |
Subject | [Csnd] Re: Plugin development questions |
Thanks, I will try that tomorrow. -- View this message in context: http://csound.1045644.n5.nabble.com/Plugin-development-questions-tp5726280p5726359.html Sent from the Csound - General mailing list archive at Nabble.com. |
Date | 2013-08-05 21:59 |
From | SimonKenny |
Subject | [Csnd] Re: Plugin development questions |
@Micheal I am using Visual Studio 2010 on the Windows machine to build the plugin. I know that the Leap library works fine using the VSC++ compiler. Do I need to use the same compiler that Csound was built in? If so, it that one of the GCC ports like MinGW? I got the prebuilt installer for Windows when I installed Csound 6. Thanks for your time -- View this message in context: http://csound.1045644.n5.nabble.com/Plugin-development-questions-tp5726280p5726361.html Sent from the Csound - General mailing list archive at Nabble.com. |