[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Réf. : [nanogui] viewml compilation problem
From: ####@####.#### Date: 4 Apr 2006 13:12:36 +0100 Message-Id: <OFD890D015.B5D713B2-ONC1257146.00421252-C1257146.00433F6A@fr.abx.fr> Hi, Here is a part of the patch I use to compile viewml with gcc 3.4.3 : I don't know if an official patch had been released, correcting following things, but it could be a good idea. diff -rNu viewml2/src/bookmark.cpp viewml/src/bookmark.cpp --- viewml2/src/bookmark.cpp 2005-10-04 18:33:51.817941656 +0200 +++ viewml/src/bookmark.cpp 2005-10-04 18:36:39.957380576 +0200 @@ -107,7 +107,7 @@ idx *= -1; idx--; - m_bmv_srt.insert(&m_bmv_srt[idx], bmData); + m_bmv_srt.insert(m_bmv_srt.begin()+idx, bmData); m_nelem = m_bmv_srt.size(); // Decide if updates are to be set... @@ -138,7 +138,7 @@ if (idx < 0 || idx >= m_nelem) return; - m_bmv_srt.erase(&m_bmv_srt[idx]); + m_bmv_srt.erase(m_bmv_srt.begin()+idx); m_nelem = m_bmv_srt.size(); if (m_mb) diff -rNu viewml2/src/bookmark.h viewml/src/bookmark.h --- viewml2/src/bookmark.h 2005-10-04 18:33:51.858935424 +0200 +++ viewml/src/bookmark.h 2005-10-04 18:36:39.958380424 +0200 @@ -26,7 +26,7 @@ extern void DelBookmark_cb(Fl_Widget *w, void *data); extern void SelBookmark_cb(Fl_Widget *w, void *data); - +using namespace std; class BookMark { typedef struct diff -rNu viewml2/src/fltk/nxslider.cpp viewml/src/fltk/nxslider.cpp --- viewml2/src/fltk/nxslider.cpp 2005-10-04 18:33:52.424849392 +0200 +++ viewml/src/fltk/nxslider.cpp 2005-10-04 18:36:39.958380424 +0200 @@ -10,16 +10,16 @@ Fl_Valuator(x, y, w, h, l) { // Provide the "look-and-feel" - db_handle *db = db_openDB(db_getDefaultDB(), PAR_DB_MODE_RDONLY); - unsigned long c=0; + //db_handle *db = db_openDB(db_getDefaultDB(), PAR_DB_MODE_RDONLY); + unsigned long c=FL_BLACK; - par_getGlobalColor(db, "scrolltray", &c); + //par_getGlobalColor(db, "scrolltray", &c); scroll_tray = fl_color_cube( ((c>>16) & 0xFF)*FL_NUM_RED/256, ((c>>8) & 0xFF)*FL_NUM_GREEN/256,(c & 0xFF)*FL_NUM_BLUE/256); - par_getGlobalColor(db, "scrollface", &c); - + //par_getGlobalColor(db, "scrollface", &c); + c=FL_WHITE; scroll_face = fl_color_cube( ((c>>16) & 0xFF)*FL_NUM_RED/256, ((c>>8) & 0xFF)*FL_NUM_GREEN/256,(c & 0xFF)*FL_NUM_BLUE/256); diff -rNu viewml2/src/fltk/nxslider.h viewml/src/fltk/nxslider.h --- viewml2/src/fltk/nxslider.h 2005-10-04 18:33:52.543831304 +0200 +++ viewml/src/fltk/nxslider.h 2005-10-04 18:36:39.959380272 +0200 @@ -5,7 +5,7 @@ #include <FL/Fl_Slider.H> #include <FL/fl_draw.H> #include <FL/Fl_Valuator.H> -#include <par.h> +//#include <par.h> class NxSlider : public Fl_Valuator { diff -rNu viewml2/src/fltk/qdict.h viewml/src/fltk/qdict.h --- viewml2/src/fltk/qdict.h 2005-10-04 18:33:52.102898336 +0200 +++ viewml/src/fltk/qdict.h 2005-10-04 18:36:39.959380272 +0200 @@ -23,7 +23,7 @@ virtual void clear() { - map<string,T*>::iterator pos; + typename map<string,T*>::iterator pos; if(m_bAutoDelete) { for(pos=m_Map.begin(); pos != m_Map.end(); ++pos) delete pos->second; @@ -33,7 +33,7 @@ T* find(const QString & key) { - map<string,T*>::iterator pos; + typename map<string,T*>::iterator pos; pos = m_Map.find(key); if(pos != m_Map.end()) @@ -44,7 +44,7 @@ bool remove(const QString & key) { - map<string,T*>::iterator pos; + typename map<string,T*>::iterator pos; pos = m_Map.find(key); if(pos != m_Map.end()) { @@ -62,15 +62,15 @@ m_Map[key] = (T*)item; } - map<string,T*>::iterator end() { return m_Map.end(); } - map<string,T*>::iterator begin() { return m_Map.begin(); } + typename map<string,T*>::iterator end() { return m_Map.end(); } + typename map<string,T*>::iterator begin() { return m_Map.begin(); } }; template <class T> class QDictIterator { protected: - map<string,T*>::iterator m_Pos; + typename map<string,T*>::iterator m_Pos; QDict<T> & m_Dict; public: QDictIterator(QDict<T> & t) : m_Dict(t) { m_Pos = t.begin(); } diff -rNu viewml2/src/fltk/qlist.h viewml/src/fltk/qlist.h --- viewml2/src/fltk/qlist.h 2005-10-04 18:33:52.246876448 +0200 +++ viewml/src/fltk/qlist.h 2005-10-04 18:36:39.960380120 +0200 @@ -3,7 +3,7 @@ #include <vector> #include "qcollection.h" - +using namespace std; template <class T> class QList : public vector<T*>, public QCollection { @@ -143,7 +143,7 @@ bool removeRef(const T* item) { - vector<T*>::iterator pos = find(begin(),end(),item); + typename vector<T*>::iterator pos = find(begin(),end(),item); if(pos != end()) { if(m_bAutoDelete) delete *pos; diff -rNu viewml2/src/fltk/qpainter.cpp viewml/src/fltk/qpainter.cpp --- viewml2/src/fltk/qpainter.cpp 2005-10-04 18:33:52.137893016 +0200 +++ viewml/src/fltk/qpainter.cpp 2005-10-04 18:36:39.960380120 +0200 @@ -2,7 +2,7 @@ #include "qwidget.h" #include "FL/fl_draw.H" #ifdef NANOX -#include <FL/n_x.h> +#include <n_x.h> #else #include <FL/x.H> #endif diff -rNu viewml2/src/fltk/qstring.h viewml/src/fltk/qstring.h --- viewml2/src/fltk/qstring.h 2005-10-04 18:33:52.385855320 +0200 +++ viewml/src/fltk/qstring.h 2005-10-04 18:36:39.961379968 +0200 @@ -11,7 +11,7 @@ //#include "qregexp.h" class QRegExp; - +using namespace std; class QString : public string { protected: @@ -68,7 +68,7 @@ { QString s; s.assign(c_str()); - transform(s.begin(), s.end(), s.begin(), tolower); + transform(s.begin(), s.end(), s.begin(), (int(*)(int))std::tolower); return s; } @@ -76,7 +76,7 @@ { QString s; s.assign(c_str()); - transform(s.begin(), s.end(), s.begin(), toupper); + transform(s.begin(), s.end(), s.begin(), (int(*)(int))std::toupper); return s; } diff -rNu viewml2/src/htmlobj.cpp viewml/src/htmlobj.cpp --- viewml2/src/htmlobj.cpp 2005-10-04 18:33:52.630818080 +0200 +++ viewml/src/htmlobj.cpp 2005-10-04 18:36:39.963379664 +0200 @@ -1882,14 +1882,15 @@ areas.setAutoDelete( true ); mapurl = _url; htmlWidget = w; - - if ( strchr ( mapurl, ':' ) ) + const char * pc = mapurl; + if ( strchr ( pc, ':' ) ) htmlWidget->requestFile( this, mapurl ); } HTMLMap::~HTMLMap() { - if ( strchr ( mapurl, ':' ) ) + const char * pc = mapurl; + if ( strchr ( pc, ':' ) ) htmlWidget->cancelRequestFile( this ); } diff -rNu viewml2/src/htmlobj.h viewml/src/htmlobj.h --- viewml2/src/htmlobj.h 2005-10-04 18:33:52.575826440 +0200 +++ viewml/src/htmlobj.h 2005-10-04 18:36:39.963379664 +0200 @@ -367,7 +367,7 @@ class HTMLTextSlave; class HTMLText : public HTMLObject { - friend HTMLTextSlave; + friend class HTMLTextSlave; public: HTMLText( const char*, const HTMLFont *, QPainter *); HTMLText( const HTMLFont *, QPainter * ); @@ -397,7 +397,7 @@ class HTMLTextMaster : public HTMLText { - friend HTMLTextSlave; + friend class HTMLTextSlave; public: HTMLTextMaster( const char* _text, const HTMLFont *_font, QPainter *_painter); | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui]Réf.: [nanogui] viewml compilation problem
From: Durai ####@####.#### Date: 4 Apr 2006 19:43:13 +0100 Message-Id: <1144176123.760.125.camel@localhost.localdomain> Hi emoroto, Thanks for providing this patch. It fixes many compilation errors. When I run viewml binary (with microwindows backend), it is complaining about the missing fonts. #viewml www.viewml.com Nano-X-Freetype2: Freetype 2 error 1 trying to load font. freetype2_createfont: System,14 not found Nano-X-Freetype2: Freetype 2 error 1 trying to load font. freetype2_createfont: System,14 not found Nano-X-Freetype2: Freetype 2 error 1 trying to load font. freetype2_createfont: System,10 not found Nano-X-Freetype2: Freetype 2 error 1 trying to load font. freetype2_createfont: System,24 not found Regards Durai On Tue, 2006-04-04 at 14:12 +0200, ####@####.#### wrote: > Hi, > > Here is a part of the patch I use to compile viewml with gcc 3.4.3 : > I don't know if an official patch had been released, correcting following > things, but it could be a good idea. > | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |