Page 1 of 1

Build Error in midifactory.cc

Posted: Sat Mar 21, 2009 3:34 pm
by sremington
I was building CVS HEAD on an Ubuntu Jaunty box and was getting the following error:

midifactory.cc:91: error: ‘strdup’ was not declared in this scope

The following diff fixed it:

Code: Select all

Index: libs/midi++/midifactory.cc
===================================================================
RCS file: /cvsroot/sooperlooper/sooperlooper/libs/midi++/midifactory.cc,v
retrieving revision 1.1
diff -u -r1.1 midifactory.cc
--- libs/midi++/midifactory.cc	6 Nov 2004 21:07:59 -0000	1.1
+++ libs/midi++/midifactory.cc	21 Mar 2009 19:31:21 -0000
@@ -35,6 +35,8 @@
 #include <midi++/coremidi_midiport.h>
 #endif // WITH_COREMIDI
 
+#include <cstring>
+
 
 using namespace std;
 using namespace MIDI;

Re: Build Error in midifactory.cc

Posted: Sat Mar 21, 2009 4:40 pm
by jesse
Thanks for the heads up, new compiler versions always turn up things like this.

Re: Build Error in midifactory.cc

Posted: Thu Apr 30, 2009 12:31 pm
by Concussion
This seems to be the same issue that I am having.

What do I do with this to make my error go away?

Thanks,

Re: Build Error in midifactory.cc

Posted: Thu Apr 30, 2009 3:05 pm
by sremington
In the source tree open up the libs/midi++/midifactory.cc file and add the line:

Code: Select all

#include <cstring>
up at the very top. Take a look at the diff at the top of the thread to get the idea. After that try compiling again.

-Seth