On Mar 10, 2006, at 10:44 AM, Abdelrazak Younes wrote:
Abdelrazak Younes a écrit :
Bennett Helm a écrit :
This should solve your problem until the makefile is fixed.
Thanks, Abdel. I now run into a new problem; any new suggestions?
try to include scoped_ptr at the top of QLMenubar.h:
#include <boost/scoped_ptr.hpp>
The attached patch will do so.
Abdel.
Index: D:/msys/home/yns/src/lyx-svn/trunk/src/frontends/qt4/
QLMenubar.h
===================================================================
--- D:/msys/home/yns/src/lyx-svn/trunk/src/frontends/qt4/
QLMenubar.h (revision 13312)
+++ D:/msys/home/yns/src/lyx-svn/trunk/src/frontends/qt4/
QLMenubar.h (working copy)
@@ -15,7 +15,11 @@
#include "frontends/Menubar.h"
-#include <map>
+#include <map>
+
+#ifdef Q_WS_MACX
+#include <boost/scoped_ptr.hpp>
+#endif
#include <QObject>
Hmmm.... Doesn't seem to do anything, and I wonder if the #ifdef
Q_WS_MACX is working properly: when I comment out the #ifdef and
#endif lines (which shouldn't matter for me, right?), I no longer get
the "'boost' has not been declared" error.
I do get a different error, however -- see below.
Bennett
Making all in moc
make all-am
/Users/bennett/lyx/gcc-4.0/qt-mac-opensource-src-4.1.1//bin/moc -o
QLMenubar_moc.C ../QLMenubar.h
if /bin/sh ../../../../libtool --tag=CXX --mode=compile g++ -
DHAVE_CONFIG_H -I. -I. -I../../../../src -DQT_CLEAN_NAMESPACE -
DQT_GENUINE_STR -DQT_NO_STL -DQT3_SUPPORT -DQT_NO_TRANSLATION -
I../../../../src -I../../../../src/frontends -I../../../../src/
frontends/controllers -I../../../../src/frontends/qt4 -I../../../../
src/frontends/qt4 -I/Users/bennett/lyx/gcc-4.0/qt-mac-opensource-
src-4.1.1//include -I/Users/bennett/lyx/gcc-4.0/qt-mac-opensource-
src-4.1.1//include/Qt -I/Users/bennett/lyx/gcc-4.0/qt-mac-opensource-
src-4.1.1//include/QtCore -I/Users/bennett/lyx/gcc-4.0/qt-mac-
opensource-src-4.1.1//include/QtGui -I/Users/bennett/lyx/gcc-4.0/qt-
mac-opensource-src-4.1.1//include/Qt3Support -I../../../../boost -
Wextra -Wall -g -Os -MT QLMenubar_moc.lo -MD -MP -MF ".deps/
QLMenubar_moc.Tpo" -c -o QLMenubar_moc.lo QLMenubar_moc.C; \
then mv -f ".deps/QLMenubar_moc.Tpo" ".deps/QLMenubar_moc.Plo"; else
rm -f ".deps/QLMenubar_moc.Tpo"; exit 1; fi
g++ -DHAVE_CONFIG_H -I. -I. -I../../../../src -DQT_CLEAN_NAMESPACE -
DQT_GENUINE_STR -DQT_NO_STL -DQT3_SUPPORT -DQT_NO_TRANSLATION -
I../../../../src -I../../../../src/frontends -I../../../../src/
frontends/controllers -I../../../../src/frontends/qt4 -I../../../../
src/frontends/qt4 -I/Users/bennett/lyx/gcc-4.0/qt-mac-opensource-
src-4.1.1//include -I/Users/bennett/lyx/gcc-4.0/qt-mac-opensource-
src-4.1.1//include/Qt -I/Users/bennett/lyx/gcc-4.0/qt-mac-opensource-
src-4.1.1//include/QtCore -I/Users/bennett/lyx/gcc-4.0/qt-mac-
opensource-src-4.1.1//include/QtGui -I/Users/bennett/lyx/gcc-4.0/qt-
mac-opensource-src-4.1.1//include/Qt3Support -I../../../../boost -
Wextra -Wall -g -Os -MT QLMenubar_moc.lo -MD -MP -MF .deps/
QLMenubar_moc.Tpo -c QLMenubar_moc.C -o QLMenubar_moc.o
../../../../boost/boost/checked_delete.hpp: In function 'void
boost::checked_delete(T*) [with T = QMenuBar]':
../../../../boost/boost/scoped_ptr.hpp:77: instantiated from
'boost::scoped_ptr<T>::~scoped_ptr() [with T = QMenuBar]'
../QLMenubar.h:40: instantiated from here
../../../../boost/boost/checked_delete.hpp:32: error: invalid
application of 'sizeof' to incomplete type 'QMenuBar'
../../../../boost/boost/checked_delete.hpp:32: error: creating array
with size zero ('-0x00000000000000001')
../../../../boost/boost/checked_delete.hpp:33: error: invalid
application of 'sizeof' to incomplete type 'QMenuBar'
../../../../boost/boost/checked_delete.hpp:33: error: creating array
with size zero ('-0x00000000000000001')
../../../../boost/boost/checked_delete.hpp:34: warning: possible
problem detected in invocation of delete operator:
../../../../boost/boost/checked_delete.hpp:29: warning: 'x' has
incomplete type
../QLMenubar.h:26: warning: forward declaration of 'struct QMenuBar'
../../../../boost/boost/checked_delete.hpp:34: note: neither the
destructor nor the class-specific operator delete will be called,
even if they are declared when the class is defined.
make[3]: *** [QLMenubar_moc.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2