Build Error in midifactory.cc

Talk about building the software from source code, and any issues related.

Moderator: jesse

Post Reply
sremington
Posts: 23
Joined: Wed Sep 17, 2008 12:07 pm

Build Error in midifactory.cc

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

jesse
Posts: 517
Joined: Sat Sep 06, 2008 9:46 am
Contact:

Re: Build Error in midifactory.cc

Post by jesse »

Thanks for the heads up, new compiler versions always turn up things like this.

Concussion
Posts: 7
Joined: Mon Apr 27, 2009 8:07 pm

Re: Build Error in midifactory.cc

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

sremington
Posts: 23
Joined: Wed Sep 17, 2008 12:07 pm

Re: Build Error in midifactory.cc

Post 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

Post Reply