On Sun, Jul 13, 2008 at 01:54:45PM +0200, Fabio Scotoni wrote:
> Hello,
>
> On Sun, 13 Jul 2008, [EMAIL PROTECTED] wrote:
>>>    http://code.suckless.org/dl/misc
>> Thanks for that. Really, I depend on that robust piece of code,  which has 
>> proven to be stable the
>> last years. Anyway I need to go deeper into the dwm evaluation period and 
>> see if dwm can cope
>
> Is there any trick to compile it? I absoulutely failed to compile it,
> but i'm interested in wmi. If anybody cares, here the error:
> Making all in src
> make[2]: Entering directory `/home/fabio/misc/src/wmi-10/src'
> g++ -DHAVE_CONFIG_H -I. -I. -I..     -Os -g -O2  -I/usr/include/freetype2   
> -c -o inputbar.o inputbar.cpp
> inputbar.cpp: In constructor 'InputBar::InputBar(Monitor*, Rectangle*)':
> inputbar.cpp:34: error: no match for 'operator=' in 
> '((InputBar*)this)->InputBar::entryEnd_ = 0'
> /usr/lib/gcc/i686-pc-linux-gnu/4.3.1/../../../../include/c++/4.3.1/bits/stl_tree.h:222:
>  note: candidates are: std::_Rb_tree_const_iterator<std::basic_string<char, 
> std::char_traits<char>, std::allocator<char> > >& 
> std::_Rb_tree_const_iterator<std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > >::operator=(const 
> std::_Rb_tree_const_iterator<std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > >&)
> inputbar.cpp: In member function 'void InputBar::queryText(std::string)':
> inputbar.cpp:236: error: no match for 'operator=' in 
> '((InputBar*)this)->InputBar::entryEnd_ = 0'
> /usr/lib/gcc/i686-pc-linux-gnu/4.3.1/../../../../include/c++/4.3.1/bits/stl_tree.h:222:
>  note: candidates are: std::_Rb_tree_const_iterator<std::basic_string<char, 
> std::char_traits<char>, std::allocator<char> > >& 
> std::_Rb_tree_const_iterator<std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > >::operator=(const 
> std::_Rb_tree_const_iterator<std::basic_string<char, std::char_traits<char>, 
> std::allocator<char> > >&)
> make[2]: *** [inputbar.o] Error 1
> make[2]: Leaving directory `/home/fabio/misc/src/wmi-10/src'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/fabio/misc/src/wmi-10'
> make: *** [all] Error 2
>

With attached patch it compiles fine (gcc 4.3).

-- 
Sergey
diff -r 6b4e7138042b src/action.cpp
--- a/src/action.cpp	Sat Jan 27 17:29:39 2007 +0300
+++ b/src/action.cpp	Sun Jul 13 22:21:27 2008 +0400
@@ -2,6 +2,11 @@
 // See ../LICENSE.txt for license details.
 //
 // $Id: action.cpp 734 2004-09-27 18:15:45Z garbeam $
+
+extern "C" {
+#include <stdlib.h> // free
+#include <string.h> // strdup
+}
 
 #include <string>
 #include "wmi.h"
diff -r 6b4e7138042b src/frame.h
--- a/src/frame.h	Sat Jan 27 17:29:39 2007 +0300
+++ b/src/frame.h	Sun Jul 13 22:21:27 2008 +0400
@@ -35,7 +35,7 @@
     void focus(Client *client);
 
     void attach(Client *client);
-    Client *Frame::detach(Client *client);
+    Client *detach(Client *client);
 
     virtual Window window();
 
diff -r 6b4e7138042b src/inputbar.cpp
--- a/src/inputbar.cpp	Sat Jan 27 17:29:39 2007 +0300
+++ b/src/inputbar.cpp	Sun Jul 13 22:21:27 2008 +0400
@@ -31,7 +31,7 @@
     prompt_ = 0;
     promptCounter_ = 0;
     isArgument_ = false;
-    entryBegin_ = entryEnd_ = 0;
+    entryBegin_ = entryEnd_ = (Sstring::iterator)0;
     partitionBegin_ = selected_ = entryBegin_;
     args_ = "";
     LOGDEBUG("creating input");
@@ -233,7 +233,7 @@
         clearPrevPartitionsStack();
     }
     else {
-        entryBegin_ = entryEnd_ = 0;
+        entryBegin_ = entryEnd_ = (Sstring::iterator)0;
         partitionBegin_ = selected_ = entryBegin_;
         text_ = text;
     }
diff -r 6b4e7138042b src/kernel.h
--- a/src/kernel.h	Sat Jan 27 17:29:39 2007 +0300
+++ b/src/kernel.h	Sun Jul 13 22:21:27 2008 +0400
@@ -167,7 +167,7 @@
 
     void cleanup();
 
-    Prompt *Kernel::defaultPrompt() const;
+    Prompt *defaultPrompt() const;
 
     void setMenuMode(bool isMenuMode);
 
diff -r 6b4e7138042b src/logger.cpp
--- a/src/logger.cpp	Sat Jan 27 17:29:39 2007 +0300
+++ b/src/logger.cpp	Sun Jul 13 22:21:27 2008 +0400
@@ -2,6 +2,10 @@
 // See ../LICENSE.txt for license details.
 //
 // $Id: logger.cpp 734 2004-09-27 18:15:45Z garbeam $
+
+extern "C" {
+#include <stdlib.h> // exit
+}
 
 #include <iostream>
 
diff -r 6b4e7138042b src/main.cpp
--- a/src/main.cpp	Sat Jan 27 17:29:39 2007 +0300
+++ b/src/main.cpp	Sun Jul 13 22:21:27 2008 +0400
@@ -10,6 +10,7 @@
 #include <assert.h>
 #include <unistd.h> // getopt stuff
 #include <stdlib.h> // getenv stuff
+#include <string.h> // strlen
 #include <X11/Xlib.h>
 }
 
diff -r 6b4e7138042b src/util.cpp
--- a/src/util.cpp	Sat Jan 27 17:29:39 2007 +0300
+++ b/src/util.cpp	Sun Jul 13 22:21:27 2008 +0400
@@ -5,6 +5,7 @@
 
 extern "C" {
 #include <unistd.h>
+#include <stdlib.h> // atoi
 #include <X11/Xlib.h>
 }
 
diff -r 6b4e7138042b src/wmiremote.cpp
--- a/src/wmiremote.cpp	Sat Jan 27 17:29:39 2007 +0300
+++ b/src/wmiremote.cpp	Sun Jul 13 22:21:27 2008 +0400
@@ -7,6 +7,7 @@
 
 extern "C" {
 #include <unistd.h> // getopt stuff
+#include <stdlib.h> // exit
 #include <X11/Xatom.h>
 #include <X11/Xlib.h>
 #include <X11/Xutil.h>

Reply via email to