Russian Qt Forum
Март 29, 2024, 10:41 *
Добро пожаловать, Гость. Пожалуйста, войдите или зарегистрируйтесь.
Вам не пришло письмо с кодом активации?

Войти
 
  Начало   Форум  WIKI (Вики)FAQ Помощь Поиск Войти Регистрация  

Страниц: [1]   Вниз
  Печать  
Автор Тема: Qt 4 + Qwt  (Прочитано 11759 раз)
ElderOrb
Гость
« : Август 30, 2005, 11:40 »

Кто-нибудь пробовал собирать и использовать Qwt под 4-ым Qt ?
Записан
KADABRA
Гость
« Ответ #1 : Август 30, 2005, 11:52 »

ИМХО не получится - слишким много изменений в четвёрке по сравнению с 3.
Записан
ElderOrb
Гость
« Ответ #2 : Август 30, 2005, 12:11 »

Дело в том, что примерно полтора месяца назад в рассылке по Qwt была упомянута бэтка нового Qwt, которая должна была работать под Qt 4. Но на сайте qwt.sf.net об этом ничего не говорится и скачать эту бэтку тоже нельзя. Но, возможно, можно собрать вручную из того, что выложено на cvs.
Записан
SLiDER
Гость
« Ответ #3 : Август 30, 2005, 12:56 »

Цитата: "ElderOrb"
Дело в том, что примерно полтора месяца назад в рассылке по Qwt была упомянута бэтка нового Qwt, которая должна была работать под Qt 4. Но на сайте qwt.sf.net об этом ничего не говорится и скачать эту бэтку тоже нельзя. Но, возможно, можно собрать вручную из того, что выложено на cvs.


На сайте QWT, на sourceforge.net, по ссылке http://sourceforge.net/mailarchive/forum.php?forum_id=4276, располагается оффлайновая версия этой самой рассылки, где авторы довольно часто постят новости о библиотеке. Недавно я на этом форуме делал репост просьбы о помощи в тестировании, но это почему то никого не заинтересовало. Вчера в этой же рассылке появилась просьба протестировать очередную бету на VisualStudio (так как у автора нет такой возможности, а под Linux-ом собиралась и предыдущая). Вот вам ссылочка на письмо : http://sourceforge.net/mailarchive/forum.php?thread_id=8078750&forum_id=4276,
а вот на последний снапшот : http://qwt.sourceforge.net/snapshot/. И ненадо ни каких CVS.

И не говорите потом, что ничего нет  :twisted:
Записан
ElderOrb
Гость
« Ответ #4 : Август 30, 2005, 13:17 »

Супер!.. Попробую-ка я это скачать и собрать!
Записан
ElderOrb
Гость
« Ответ #5 : Август 30, 2005, 13:42 »

Попробовал. Гкхм.

C:\>cd qt

C:\Qt>cd qwt-20050830

C:\Qt\qwt-20050830>qmake qwt.pro

C:\Qt\qwt-20050830>nmake > log.txt

Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.


Microsoft (R) Program Maintenance Utility Version 7.10.3077
Copyright (C) Microsoft Corporation.  All rights reserved.

NMAKE : fatal error U1077: 'cl' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio .NET 2003\
VC7\BIN\nmake.exe"' : return code '0x2'
Stop.

А в логе я увидел множество чего-то такого:

Код:

c:\Qt\qwt-20050830\include\qwt_double_rect.h(30) : error C2949: 'QVector<T>' : explicit instantiation; cannot use 'auto' and 'extern' on the same template-class specialization
        with
        [
            T=QPointF
        ]
qwt_plot_axis.cpp
c:\Qt\qwt-20050830\include\qwt_scale_div.h(30) : warning C4661: 'QSet<T> QList<T>::toSet(void) const' : no suitable definition provided for explicit template instantiation request
        with
        [
            T=double
        ]
        c:\Qt\4.0.0\include\QtCore\../../src\corelib\tools\qlist.h(268) : see declaration of 'QList<T>::toSet'
        with
        [
            T=double
        ]
c:\Qt\qwt-20050830\include\qwt_scale_div.h(30) : warning C4661: 'QList<T> QList<T>::fromSet(const QSet<T> &)' : no suitable definition provided for explicit template instantiation request
        with
        [
            T=double
        ]
        c:\Qt\4.0.0\include\QtCore\../../src\corelib\tools\qlist.h(271) : see declaration of 'QList<T>::fromSet'
        with
        [
            T=double
        ]
c:\Qt\4.0.0\include\QtCore\../../src\corelib\tools\qlist.h(491) : warning C4661: 'QSet<T> QList<T>::toSet(void) const' : no suitable definition provided for explicit template instantiation request
        with
        [
            T=double
        ]
        c:\Qt\4.0.0\include\QtCore\../../src\corelib\tools\qlist.h(268) : see declaration of 'QList<T>::toSet'
        with
        [
            T=double
        ]
c:\Qt\4.0.0\include\QtCore\../../src\corelib\tools\qlist.h(491) : warning C4661: 'QList<T> QList<T>::fromSet(const QSet<T> &)' : no suitable definition provided for explicit template instantiation request
        with
        [
            T=double
        ]
        c:\Qt\4.0.0\include\QtCore\../../src\corelib\tools\qlist.h(271) : see declaration of 'QList<T>::fromSet'
        with
        [
            T=double
        ]
c:\Qt\4.0.0\include\QtCore\../../src\corelib\tools\qvector.h(588) : warning C4661: 'QSet<T> QList<T>::toSet(void) const' : no suitable definition provided for explicit template instantiation request
        with
        [
            T=double
        ]
        c:\Qt\4.0.0\include\QtCore\../../src\corelib\tools\qlist.h(268) : see declaration of 'QList<T>::toSet'
        with
        [
            T=double
        ]
c:\Qt\4.0.0\include\QtCore\../../src\corelib\tools\qvector.h(588) : warning C4661: 'QList<T> QList<T>::fromSet(const QSet<T> &)' : no suitable definition provided for explicit template instantiation request
        with
        [
            T=double
        ]
        c:\Qt\4.0.0\include\QtCore\../../src\corelib\tools\qlist.h(271) : see declaration of 'QList<T>::fromSet'
        with
        [
            T=double
        ]
qwt_plot_curve.cpp
c:\Qt\qwt-20050830\include\qwt_double_rect.h(30) : error C2949: 'QVector<T>' : explicit instantiation; cannot use 'auto' and 'extern' on the same template-class specialization
        with
        [
            T=QPointF
        ]
qwt_plot_dict.cpp
qwt_plot_grid.cpp
c:\Qt\qwt-20050830\include\qwt_double_rect.h(30) : error C2949: 'QVector<T>' : explicit instantiation; cannot use 'auto' and 'extern' on the same template-class specialization
        with
        [
            T=QPointF
        ]
qwt_plot_item.cpp
src\qwt_plot_item.cpp(140) : warning C4805: '!=' : unsafe mix of type 'int' and type 'bool' in operation
Generating Code...
c:\qt\qwt-20050830\include\qwt_event_pattern.h(200) : warning C4717: 'operator==' : recursive on all control paths, function will cause runtime stack overflow
c:\qt\qwt-20050830\include\qwt_event_pattern.h(201) : warning C4717: 'operator==' : recursive on all control paths, function will cause runtime stack overflow
c:\qt\qwt-20050830\include\qwt_event_pattern.h(200) : warning C4717: 'operator==' : recursive on all control paths, function will cause runtime stack overflow
c:\qt\qwt-20050830\include\qwt_event_pattern.h(201) : warning C4717: 'operator==' : recursive on all control paths, function will cause runtime stack overflow
c:\qt\qwt-20050830\include\qwt_event_pattern.h(200) : warning C4717: 'operator==' : recursive on all control paths, function will cause runtime stack overflow
c:\qt\qwt-20050830\include\qwt_event_pattern.h(201) : warning C4717: 'operator==' : recursive on all control paths, function will cause runtime stack overflow


А я-то уже было понадеялся ж(
Записан
SLiDER
Гость
« Ответ #6 : Август 30, 2005, 22:26 »

ДЛЯ ВСЕХ ИНТИРЕСУЮЩИХСЯ.

Последний снапшот Qwt НОРМАЛЬНО собирается с помощью VS2003 (c VS6 не проверял) хоть и с небольшими НО, но 8-) о них ниже. Взять снапшот можно этот http://qwt.sourceforge.net/snapshot/qwt-20050830.tar.bz2 (831k) или этот http://qwt.sourceforge.net/snapshot/qwt-20050830.zip (1.4M). Самый простой способ откомпилировать библиотеку это сделать экспорт qwt.pro файла в VS2003 через меню (Qt -> Open Solution from .pro File).

Теперь о выше означенных НО:
1. Как я уже писал, в самой Qt есть баг и для успешной компиляции нужно патчить файл qmap.h.

Код:
qmap.h in Qt 4.0.0 is buggy. The following lines need to be patched:
 
 qmap.h: line 265:
     "iterator r = *this;" =>
     "const_iterator r = *this;"
 qmap.h: line 807:
     "map.insert((*it).first, (*it).second);" =>
     "map.insert(std::pair<Key,T>(it.key(),it.value()));"


2. Есть не большой баг не баг, но ошибочка, которую так и не поправили (почемуто) в самой Qwt
 
Код:
Look for the following code piece in qwt_double_rect.h and swap the
 comments:
 
 // extern template class __declspec(dllimport) QwtArray<QPointF>;
 template class QWT_EXPORT QwtArray<QPointF>;
 
 Sorry, we have still some lose ends for a few template issues regarding
 exporting names in dll"s.

3. Тем кто захочет откомпилировать примеры из командной строки пригодится вот это
Код:
Ok, found some not working stuff in examples.pri. Please replace with
 the following lines:
 
 win32-msvc:LIBS  += ../../lib/qwt5.lib
 win32-msvc.net:LIBS  += ../../lib/qwt5.lib
 win32-g++:LIBS   += -L../../lib -lqwt5
 
 (There are simplifications possible, but this works here ...)


при компиляции из VS2003 (через экспорт .pro файла) нужно просто добавить ко всем проектам qwt5.lib

4. Последнее, но пожалуй самое неприятное.
Код:
Unfortunately QwtPlotCurve::draw is on Win32 as slow as on the Mac, because
 Qt::WA_PaintOutsidePaintEvent doesn"t work there too.

Что означает следующее -> ГРАФИКА БУДЕТ ОЧЕНЬ СИЛЬНО ТОРМОЗИТЬ. И она ТОРМОЗИТ, ТОРМОЗИТ совершенно безобразно !!!!!  :evil:  :evil:  :evil:  :evil:  :evil:  :evil:  :evil:  :evil:  :evil:  :evil:  :evil:

Так, что пробуем и делимся впечатлениями.  :wink:
Записан
ElderOrb
Гость
« Ответ #7 : Август 31, 2005, 09:18 »

Попробовал проделать всё вышенаписанное и сразу же получил ошибку
Код:

c:\Qt\qwt-20050830\include\qwt_double_rect.h(30) : error C2949: 'QVector<T>' : e
xplicit instantiation; cannot use 'auto' and 'extern' on the same template-class
 specialization
        with
        [
            T=QPointF
        ]
qwt_double_rect.cpp
qwt_interval_data.cpp


p.s. Открыть pro через вижуал не получилось (пишет cannot find qmake. Make sure you have specified Qt version - а я не знаю где её надо specify), поэтому всё делал из консоли..
Записан
SLiDER
Гость
« Ответ #8 : Август 31, 2005, 10:49 »

ElderOrb специально для вас пункт 2.  :!:
Записан
ElderOrb
Гость
« Ответ #9 : Август 31, 2005, 11:22 »

Сорри, невнимательно прочитал второй пункт ж). Изрыгая из себя милиарды варнингов Qwt всё же скомпилилась. Тормоза конечно приличные, но, во-первых, это всего лишь снапшот, а во-вторых у меня Qt 4.0.0 (вроде как в 4.0.1 соптимизировали графику).

Вывод: можно юзать ж)

Спасибо !
Записан
Страниц: [1]   Вверх
  Печать  
 
Перейти в:  


Страница сгенерирована за 0.067 секунд. Запросов: 20.