nedoPC.org

Electronics hobbyists community established in 2002
Atom Feed | View unanswered posts | View active topics It is currently 28 Mar 2024 03:52



Reply to topic  [ 235 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 16  Next
а не замутить ли нам недосимулятр? 
Author Message
Senior

Joined: 07 Aug 2006 10:18
Posts: 185
Reply with quote
Post 
Lavr wrote:
PS. Меня немного смущает, Shaos вроде как называл как раз wxWidgets
кросплатформенной приблудой, а весь остальной код Виндавозно-ориентиованным... нет?
Да это ппц, а не кроссплатформенная приблуда. Читаем http://docs.wxwidgets.org/stable/wx_xrcoverview.html
Quote:
XRC file format

Please see Technical Note 14 (docs/tech/tn0014.txt) in your wxWidgets distribution.
Идём в сорцы и читаем docs/tech/tn0014.txt:
Code:
  +-------------------------------------------------------------------------+
  |                                                                         |
  |                           !!! CAUTION !!!                               |
  |              This document is incomplete and out of date.               |
  |                                                                         |
  |   Please see http://docs.wxwidgets.org/trunk/xrc_format.html for the    |
  |   authoritative version of XRC format specification.                    |
  |                                                                         |
  +-------------------------------------------------------------------------+
Идём на http://docs.wxwidgets.org/trunk/xrc_format.html и видим:
Quote:
Documentation Not Found

The requested URL was not found on this server, and I couldn't find any pages like it in other versions of the manual, sorry.

You can try looking for the page yourself in one of the available manuals.
wxWidgets может кроссплатформенно послать на три буквы, сказать "накося, выкуси. член тебе, а не документацию." И нет чтобы просто сказать, что недокументировано и всё тут, так нет ведь, надо отправить к сорцам, чтобы я выудил бы эти сорцы из /usr/portage/distfiles, распаковал бы, заглянул внутрь, скопировал бы оттуда url в браузер... Что сложно было прям сразу воткнуть в документацию ссылку http://natribu.org/ ?


13 Aug 2012 07:32
Profile
Senior

Joined: 07 Aug 2006 10:18
Posts: 185
Reply with quote
Post 
Хех. Оно запустилось.

http://imglink.ru/show-image.php?id=f9f ... 616465d34f

Судя по квадратикам вместо буковок, и флуду в консоли об "invalid UTF-8 string passed", проблемы со строками-таки не решаются тупыми преобразованиями типов.
И, мне кажется, что не хватает какого-то виджета слева: там пустое место зачем-то.

Но это ещё не всё. Это чудо, оказывается, разбирая файл библиотеки полагается на то, что по достижению конца файла вылетит исключение. Исключение же, как ни странно, не вылетает, и поэтому программа навсегда залипает в вечном цикле.


13 Aug 2012 10:38
Profile
Supreme God
User avatar

Joined: 21 Oct 2009 08:08
Posts: 7777
Location: Россия
Reply with quote
Post 
Ну так сравним:



Image

Нет меню и рисунков - слева... так? Остальное - похоже...

_________________
iLavr


13 Aug 2012 15:36
Profile
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22409
Location: Silicon Valley
Reply with quote
Post 
угу - прогресс на лице :roll:

bar, сырцы дашь? я тоже попробую чегонить повтыкать...

_________________
:dj: https://mastodon.social/@Shaos


13 Aug 2012 16:22
Profile WWW
Senior

Joined: 07 Aug 2006 10:18
Posts: 185
Reply with quote
Post 
Shaos wrote:
угу - прогресс на лице :roll:

bar, сырцы дашь? я тоже попробую чегонить повтыкать...
Дам конечно.
Со строками, я вроде разобрался вчера. И с недостающими виджетами: они не рисуются (или может рисуются, но размеры их равны нулю), если библиотека элементов пуста.
Но выяснил, что тот самописный XMLParser надо выкидывать. Я, просто чтобы разобраться в xml формате, немного иначе расставил там переносы строк, для повышения читабельности, и эта хрень стала вылетать по SIGSEGV при парсинге. Сегодня вечерком приделаю, что-нибудь типа TinyXML вместо XMLParser.cpp и выложу тогда сорцы куда-нибудь.


14 Aug 2012 05:10
Profile
Senior

Joined: 07 Aug 2006 10:18
Posts: 185
Reply with quote
Post 
Не, сегодня, я пожалуй не успею со всем этим разобраться. Вот собственно то, что есть на данный момент: http://narod.ru/disk/59391074001.d97b6e ... r.bz2.html

По идее должно собираться командой make. Насчёт работать -- это хз. Если через парсинг библиотеки прорвётся, то интерфейс отрисует. Но функциональности никакой.


14 Aug 2012 08:35
Profile
Senior

Joined: 07 Aug 2006 10:18
Posts: 185
Reply with quote
Post 
Парсинг библиотек я перетащил на tinyxml2. Теперь у меня в списочке слева не одна библиотека, а все, что есть в TestGates.lib :)
Завтра буду выяснять, почему лишь пять элементов отрисовываются (и то лишь в списке картинок), и почему эти пять элементов выглядят не как символы, несущие для посвящённых глубокий смысл, а как... Ну, я даже не знаю с чем сравнить. Чем-то напоминает результат выполнения команды "cat /dev/random", конечно в меньших масштабах и беззвучно.


14 Aug 2012 11:11
Profile
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22409
Location: Silicon Valley
Reply with quote
Post 
bar, ты как относишься к git? можно это хозяйство загнать в github.com
p.s. ну или если ты больше любишь старый добрый cvs, то можно на sf.net залить...

_________________
:dj: https://mastodon.social/@Shaos


14 Aug 2012 12:21
Profile WWW
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22409
Location: Silicon Valley
Reply with quote
Post 
bar wrote:
Не, сегодня, я пожалуй не успею со всем этим разобраться. Вот собственно то, что есть на данный момент: http://narod.ru/disk/59391074001.d97b6e ... r.bz2.html

По идее должно собираться командой make. Насчёт работать -- это хз. Если через парсинг библиотеки прорвётся, то интерфейс отрисует. Но функциональности никакой.


Обломчик - с моим wx v2.4 оно не собирается, а wx v2.8 в мою слаку не ставится :(

_________________
:dj: https://mastodon.social/@Shaos


14 Aug 2012 20:58
Profile WWW
Senior

Joined: 07 Aug 2006 10:18
Posts: 185
Reply with quote
Post 
А у мну в генту есть ебилды лишь для 2.8 и 2.9... Можно конечно написать ебилд для 2.4, и, теоретически, gentoo позволяет иметь в системе разные версии одной библиотеки. Другое дело что я не очень представляю себе как спровоцировать emerge, при установке поставить дополнительную версию, а не заменить существующую...
Хотя, можно, не парясь, поставить куда-нибудь в $HOME. Я попробую.

И я закинул всё это на github. https://github.com/amty/cedar-logic
С git, правда, я работал лишь на уровне git clone... То есть можно сказать вообще не работал. Но думаю, разберусь.
И на github, в отличие от того tar.bz2, я вернул взад Makefile, с правилом сборки xpm'ок из bmp'шек, я его случайно удалил вместе с картинками, прочищая сорцы. =)


14 Aug 2012 21:57
Profile
Senior

Joined: 07 Aug 2006 10:18
Posts: 185
Reply with quote
Post 
Shaos wrote:
Обломчик - с моим wx v2.4 оно не собирается, а wx v2.8 в мою слаку не ставится :(

А вообще, странно это. В принципе-то, программа на sf не менялась с 2006 года. То есть, думается мне, что она должна дружить с 2.4. Я же практически ничего не менял в коде, что могло бы изменить версию. Лишь в gateImage в начале, там где объявление таблички ивентов.
Может дело в том, что я закинул на народ не собирающиеся сорцы? Там не хватало файлика GUI/xpm_bitmaps/Makefile, и где-то не хватало какого-то include'а моего заголовка. Это я потом выяснил, когда начал собирать снова. Попробуй для убеждённости с git вытянуть, и собрать. Я повозившись, сделал-таки, чтоб оно всё вытягивалось как надо. Вот последовательность команд, которая запускает у меня cedar из github:
Code:
git clone git@github.com:amty/cedar-logic.git
cd cedar-logic/
git submodule init
git submodule update
make
./cedar


15 Aug 2012 00:07
Profile
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22409
Location: Silicon Valley
Reply with quote
Post 
Code:
make: *** No rule to make target `tinyxml2/tinyxml2.o', needed by `all'.  Stop.


нету tinyxml2 там...

_________________
:dj: https://mastodon.social/@Shaos


15 Aug 2012 05:25
Profile WWW
Admin
User avatar

Joined: 08 Jan 2003 23:22
Posts: 22409
Location: Silicon Valley
Reply with quote
Post 
скопировал tinyxml2 вручную - попробовал собрать, изменив вызовы wx-config в Makefile, вот что получилось:

Code:
bash-4.1$ make
make -C logic
make[1]: Entering directory `/home/shaos/src/cedar-logic/logic'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/home/shaos/src/cedar-logic/logic'
make -C GUI
make[1]: Entering directory `/home/shaos/src/cedar-logic/GUI'
g++ -I/usr/local/lib/wx/include/gtk-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/usr/include/boost -I../tinyxml2 -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -Wall -Wno-deprecated -DUNIX -ggdb3 -c -o CircuitParse.o CircuitParse.cpp
In file included from /usr/local/include/wx/platform.h:88:0,
                 from /usr/local/include/wx/defs.h:23,
                 from /usr/local/include/wx/glcanvas.h:4,
                 from guiGate.h:33,
                 from CircuitParse.h:16,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/chkconf.h:47:9: error: #error "wxUSE_DYNLIB_CLASS must be defined."
/usr/local/include/wx/chkconf.h:55:9: error: #error "wxUSE_FILESYSTEM must be defined."
/usr/local/include/wx/chkconf.h:68:9: error: #error "wxUSE_DYNAMIC_LOADER must be defined."
/usr/local/include/wx/chkconf.h:76:9: error: #error "wxUSE_LOG must be defined."
/usr/local/include/wx/chkconf.h:84:9: error: #error "wxUSE_LONGLONG must be defined."
/usr/local/include/wx/chkconf.h:92:9: error: #error "wxUSE_MIMETYPE must be defined."
/usr/local/include/wx/chkconf.h:100:9: error: #error "wxUSE_PROLOGIO must be defined."
/usr/local/include/wx/chkconf.h:108:9: error: #error "wxUSE_PROTOCOL must be defined."
/usr/local/include/wx/chkconf.h:150:9: error: #error "wxUSE_REGEX must be defined."
/usr/local/include/wx/chkconf.h:158:9: error: #error "wxUSE_SOCKETS must be defined."
/usr/local/include/wx/chkconf.h:166:9: error: #error "wxUSE_STREAMS must be defined."
/usr/local/include/wx/chkconf.h:174:9: error: #error "wxUSE_STOPWATCH must be defined."
/usr/local/include/wx/chkconf.h:182:9: error: #error "wxUSE_TEXTBUFFER must be defined."
/usr/local/include/wx/chkconf.h:190:9: error: #error "wxUSE_TEXTFILE must be defined."
/usr/local/include/wx/chkconf.h:198:9: error: #error "wxUSE_UNICODE must be defined."
/usr/local/include/wx/chkconf.h:206:9: error: #error "wxUSE_URL must be defined."
/usr/local/include/wx/chkconf.h:224:9: error: #error "wxUSE_ACCEL must be defined."
/usr/local/include/wx/chkconf.h:232:9: error: #error "wxUSE_BMPBUTTON must be defined."
/usr/local/include/wx/chkconf.h:240:9: error: #error "wxUSE_BUTTON must be defined."
/usr/local/include/wx/chkconf.h:248:9: error: #error "wxUSE_CALENDARCTRL must be defined."
/usr/local/include/wx/chkconf.h:256:9: error: #error "wxUSE_CARET must be defined."
/usr/local/include/wx/chkconf.h:264:9: error: #error "wxUSE_CHECKBOX must be defined."
/usr/local/include/wx/chkconf.h:272:9: error: #error "wxUSE_CHECKLISTBOX must be defined."
/usr/local/include/wx/chkconf.h:280:9: error: #error "wxUSE_CHOICE must be defined."
/usr/local/include/wx/chkconf.h:288:9: error: #error "wxUSE_CHOICEDLG must be defined."
/usr/local/include/wx/chkconf.h:296:9: error: #error "wxUSE_CLIPBOARD must be defined."
/usr/local/include/wx/chkconf.h:304:9: error: #error "wxUSE_COLOURDLG must be defined."
/usr/local/include/wx/chkconf.h:312:9: error: #error "wxUSE_COMBOBOX must be defined."
/usr/local/include/wx/chkconf.h:320:9: error: #error "wxUSE_DATAOBJ must be defined."
/usr/local/include/wx/chkconf.h:328:9: error: #error "wxUSE_DOC_VIEW_ARCHITECTURE must be defined."
/usr/local/include/wx/chkconf.h:336:9: error: #error "wxUSE_FILEDLG must be defined."
/usr/local/include/wx/chkconf.h:344:9: error: #error "wxUSE_FONTDLG must be defined."
/usr/local/include/wx/chkconf.h:352:9: error: #error "wxUSE_FONTMAP must be defined."
/usr/local/include/wx/chkconf.h:360:9: error: #error "wxUSE_GAUGE must be defined."
/usr/local/include/wx/chkconf.h:368:9: error: #error "wxUSE_GRID must be defined."
/usr/local/include/wx/chkconf.h:376:9: error: #error "wxUSE_HELP must be defined."
/usr/local/include/wx/chkconf.h:384:9: error: #error "wxUSE_HTML must be defined."
/usr/local/include/wx/chkconf.h:392:9: error: #error "wxUSE_ICO_CUR must be defined."
/usr/local/include/wx/chkconf.h:400:9: error: #error "wxUSE_IFF must be defined."
/usr/local/include/wx/chkconf.h:408:9: error: #error "wxUSE_IMAGLIST must be defined."
/usr/local/include/wx/chkconf.h:416:9: error: #error "wxUSE_JOYSTICK must be defined."
/usr/local/include/wx/chkconf.h:424:9: error: #error "wxUSE_LISTBOX must be defined."
/usr/local/include/wx/chkconf.h:432:9: error: #error "wxUSE_LISTCTRL must be defined."
/usr/local/include/wx/chkconf.h:440:9: error: #error "wxUSE_LOGGUI must be defined."
/usr/local/include/wx/chkconf.h:448:9: error: #error "wxUSE_LOGWINDOW must be defined."
/usr/local/include/wx/chkconf.h:456:9: error: #error "wxUSE_LOG_DIALOG must be defined."
/usr/local/include/wx/chkconf.h:464:9: error: #error "wxUSE_MDI_ARCHITECTURE must be defined."
/usr/local/include/wx/chkconf.h:472:9: error: #error "wxUSE_MENUS must be defined."
/usr/local/include/wx/chkconf.h:480:9: error: #error "wxUSE_MSGDLG must be defined."
/usr/local/include/wx/chkconf.h:488:9: error: #error "wxUSE_NEW_GRID must be defined."
/usr/local/include/wx/chkconf.h:496:9: error: #error "wxUSE_NOTEBOOK must be defined."
/usr/local/include/wx/chkconf.h:504:9: error: #error "wxUSE_PALETTE must be defined."
/usr/local/include/wx/chkconf.h:512:9: error: #error "wxUSE_POPUPWIN must be defined."
/usr/local/include/wx/chkconf.h:520:9: error: #error "wxUSE_PRINTING_ARCHITECTURE must be defined."
/usr/local/include/wx/chkconf.h:528:9: error: #error "wxUSE_RADIOBOX must be defined."
/usr/local/include/wx/chkconf.h:536:9: error: #error "wxUSE_RADIOBTN must be defined."
/usr/local/include/wx/chkconf.h:544:9: error: #error "wxUSE_SASH must be defined."
/usr/local/include/wx/chkconf.h:552:9: error: #error "wxUSE_SCROLLBAR must be defined."
/usr/local/include/wx/chkconf.h:560:9: error: #error "wxUSE_SLIDER must be defined."
/usr/local/include/wx/chkconf.h:568:9: error: #error "wxUSE_SPINBTN must be defined."
/usr/local/include/wx/chkconf.h:576:9: error: #error "wxUSE_SPINCTRL must be defined."
/usr/local/include/wx/chkconf.h:584:9: error: #error "wxUSE_SPLASH must be defined."
/usr/local/include/wx/chkconf.h:592:9: error: #error "wxUSE_SPLITTER must be defined."
/usr/local/include/wx/chkconf.h:600:9: error: #error "wxUSE_STATBMP must be defined."
/usr/local/include/wx/chkconf.h:608:9: error: #error "wxUSE_STATBOX must be defined."
/usr/local/include/wx/chkconf.h:616:9: error: #error "wxUSE_STATLINE must be defined."
/usr/local/include/wx/chkconf.h:624:9: error: #error "wxUSE_STATTEXT must be defined."
/usr/local/include/wx/chkconf.h:632:9: error: #error "wxUSE_STATUSBAR must be defined."
/usr/local/include/wx/chkconf.h:640:9: error: #error "wxUSE_TAB_DIALOG must be defined."
/usr/local/include/wx/chkconf.h:648:9: error: #error "wxUSE_TEXTCTRL must be defined."
/usr/local/include/wx/chkconf.h:656:9: error: #error "wxUSE_TIPWINDOW must be defined."
/usr/local/include/wx/chkconf.h:664:9: error: #error "wxUSE_TOOLBAR must be defined."
/usr/local/include/wx/chkconf.h:672:9: error: #error "wxUSE_TOOLTIPS must be defined."
/usr/local/include/wx/chkconf.h:680:9: error: #error "wxUSE_TREECTRL must be defined."
/usr/local/include/wx/chkconf.h:688:9: error: #error "wxUSE_WX_RESOURCES must be defined."
/usr/local/include/wx/chkconf.h:696:9: error: #error "wxUSE_WXHTML_HELP must be defined."
/usr/local/include/wx/chkconf.h:1138:9: error: #error "wxMessageBox is always needed"
/usr/local/include/wx/chkconf.h:1184:9: error: #error "wxUSE_DYNAMIC_CLASSES must be defined as 1"
In file included from /usr/local/include/wx/memory.h:20:0,
                 from /usr/local/include/wx/object.h:25,
                 from /usr/local/include/wx/list.h:37,
                 from /usr/local/include/wx/docview.h:20,
                 from guiGate.h:39,
                 from CircuitParse.h:16,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/string.h:442:12: error: 'wxChar wxString::operator[](unsigned int) const' cannot be overloaded
/usr/local/include/wx/string.h:429:13: error: with 'wxChar wxString::operator[](size_t) const'
/usr/local/include/wx/string.h:446:13: error: 'wxChar& wxString::operator[](unsigned int)' cannot be overloaded
/usr/local/include/wx/string.h:437:13: error: with 'wxChar& wxString::operator[](size_t)'
In file included from /usr/local/include/wx/list.h:37:0,
                 from /usr/local/include/wx/docview.h:20,
                 from guiGate.h:39,
                 from CircuitParse.h:16,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/object.h:438:19: error: 'wxClassInfo' has not been declared
/usr/local/include/wx/object.h:479:5: error: 'wxObjectRefData' does not name a type
/usr/local/include/wx/object.h:480:21: error: 'wxObjectRefData' has not been declared
/usr/local/include/wx/object.h:498:13: error: 'wxObjectRefData' does not name a type
/usr/local/include/wx/object.h:501:13: error: 'wxObjectRefData' does not name a type
/usr/local/include/wx/object.h:503:5: error: 'wxObjectRefData' does not name a type
/usr/local/include/wx/object.h: In constructor 'wxObject::wxObject()':
/usr/local/include/wx/object.h:420:18: error: 'm_refData' was not declared in this scope
/usr/local/include/wx/object.h: In member function 'void wxObject::SetRefData(int*)':
/usr/local/include/wx/object.h:480:46: error: 'm_refData' was not declared in this scope
/usr/local/include/wx/object.h: At global scope:
/usr/local/include/wx/object.h:525:52: error: 'wxClassInfo' has not been declared
/usr/local/include/wx/object.h: In function 'wxObject* wxCheckDynamicCast(wxObject*, int*)':
/usr/local/include/wx/object.h:527:24: error: 'class wxObject' has no member named 'GetClassInfo'
In file included from /usr/local/include/wx/gdiobj.h:9:0,
                 from /usr/local/include/wx/gtk/colour.h:21,
                 from /usr/local/include/wx/colour.h:9,
                 from /usr/local/include/wx/gdicmn.h:28,
                 from /usr/local/include/wx/event.h:24,
                 from /usr/local/include/wx/window.h:23,
                 from /usr/local/include/wx/cmndata.h:19,
                 from /usr/local/include/wx/docview.h:21,
                 from guiGate.h:39,
                 from CircuitParse.h:16,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/gtk/gdiobj.h: In member function 'bool wxGDIObject::IsNull() const':
/usr/local/include/wx/gtk/gdiobj.h:29:35: error: 'm_refData' was not declared in this scope
In file included from /usr/local/include/wx/colour.h:9:0,
                 from /usr/local/include/wx/gdicmn.h:28,
                 from /usr/local/include/wx/event.h:24,
                 from /usr/local/include/wx/window.h:23,
                 from /usr/local/include/wx/cmndata.h:19,
                 from /usr/local/include/wx/docview.h:21,
                 from guiGate.h:39,
                 from CircuitParse.h:16,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/gtk/colour.h: In member function 'bool wxColour::Ok() const':
/usr/local/include/wx/gtk/colour.h:63:30: error: 'm_refData' was not declared in this scope
In file included from /usr/local/include/wx/gdicmn.h:29:0,
                 from /usr/local/include/wx/event.h:24,
                 from /usr/local/include/wx/window.h:23,
                 from /usr/local/include/wx/cmndata.h:19,
                 from /usr/local/include/wx/docview.h:21,
                 from guiGate.h:39,
                 from CircuitParse.h:16,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/font.h: In member function 'bool wxFontBase::Ok() const':
/usr/local/include/wx/font.h:104:30: error: 'm_refData' was not declared in this scope
/usr/local/include/wx/font.h: In member function 'wxFontRefData* wxFontBase::GetFontData() const':
/usr/local/include/wx/font.h:156:35: error: 'm_refData' was not declared in this scope
In file included from /usr/local/include/wx/gtk/cursor.h:23:0,
                 from /usr/local/include/wx/cursor.h:9,
                 from /usr/local/include/wx/event.h:25,
                 from /usr/local/include/wx/window.h:23,
                 from /usr/local/include/wx/cmndata.h:19,
                 from /usr/local/include/wx/docview.h:21,
                 from guiGate.h:39,
                 from CircuitParse.h:16,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/image.h: In member function 'bool wxImage::operator==(const wxImage&) const':
/usr/local/include/wx/image.h:262:18: error: 'm_refData' was not declared in this scope
/usr/local/include/wx/image.h:262:37: error: 'const class wxImage' has no member named 'm_refData'
/usr/local/include/wx/image.h: In member function 'bool wxImage::operator!=(const wxImage&) const':
/usr/local/include/wx/image.h:264:18: error: 'm_refData' was not declared in this scope
/usr/local/include/wx/image.h:264:37: error: 'const class wxImage' has no member named 'm_refData'
In file included from /usr/local/include/wx/region.h:9:0,
                 from /usr/local/include/wx/window.h:30,
                 from /usr/local/include/wx/cmndata.h:19,
                 from /usr/local/include/wx/docview.h:21,
                 from guiGate.h:39,
                 from CircuitParse.h:16,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/gtk/region.h: In member function 'bool wxRegion::Ok() const':
/usr/local/include/wx/gtk/region.h:89:30: error: 'm_refData' was not declared in this scope
In file included from /usr/local/include/wx/brush.h:9:0,
                 from /usr/local/include/wx/dc.h:28,
                 from /usr/local/include/wx/gtk/dcclient.h:17,
                 from /usr/local/include/wx/dcclient.h:9,
                 from /usr/local/include/wx/window.h:36,
                 from /usr/local/include/wx/cmndata.h:19,
                 from /usr/local/include/wx/docview.h:21,
                 from guiGate.h:39,
                 from CircuitParse.h:16,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/gtk/brush.h: In member function 'bool wxBrush::Ok() const':
/usr/local/include/wx/gtk/brush.h:48:30: error: 'm_refData' was not declared in this scope
In file included from /usr/local/include/wx/pen.h:9:0,
                 from /usr/local/include/wx/dc.h:29,
                 from /usr/local/include/wx/gtk/dcclient.h:17,
                 from /usr/local/include/wx/dcclient.h:9,
                 from /usr/local/include/wx/window.h:36,
                 from /usr/local/include/wx/cmndata.h:19,
                 from /usr/local/include/wx/docview.h:21,
                 from guiGate.h:39,
                 from CircuitParse.h:16,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/gtk/pen.h: In member function 'bool wxPen::Ok() const':
/usr/local/include/wx/gtk/pen.h:53:30: error: 'm_refData' was not declared in this scope
In file included from /usr/local/include/wx/gtk/accel.h:4:0,
                 from /usr/local/include/wx/accel.h:122,
                 from /usr/local/include/wx/window.h:41,
                 from /usr/local/include/wx/cmndata.h:19,
                 from /usr/local/include/wx/docview.h:21,
                 from guiGate.h:39,
                 from CircuitParse.h:16,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/generic/accel.h: In member function 'wxAcceleratorTable& wxAcceleratorTable::operator=(const wxAcceleratorTable&)':
/usr/local/include/wx/generic/accel.h:34:14: error: 'm_refData' was not declared in this scope
/usr/local/include/wx/generic/accel.h:34:33: error: 'const class wxAcceleratorTable' has no member named 'm_refData'
/usr/local/include/wx/generic/accel.h: In member function 'bool wxAcceleratorTable::operator==(const wxAcceleratorTable&) const':
/usr/local/include/wx/generic/accel.h:37:18: error: 'm_refData' was not declared in this scope
/usr/local/include/wx/generic/accel.h:37:37: error: 'const class wxAcceleratorTable' has no member named 'm_refData'
In file included from /usr/local/include/wx/window.h:1104:0,
                 from /usr/local/include/wx/cmndata.h:19,
                 from /usr/local/include/wx/docview.h:21,
                 from guiGate.h:39,
                 from CircuitParse.h:16,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/gtk/window.h: At global scope:
/usr/local/include/wx/gtk/window.h:214:5: error: 'GdkIC' does not name a type
/usr/local/include/wx/gtk/window.h:215:5: error: 'GdkICAttr' does not name a type
In file included from guiGate.h:39:0,
                 from CircuitParse.h:16,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/docview.h:245:19: error: 'wxClassInfo' has not been declared
/usr/local/include/wx/docview.h:246:19: error: 'wxClassInfo' has not been declared
/usr/local/include/wx/docview.h:288:5: error: 'wxClassInfo' does not name a type
/usr/local/include/wx/docview.h:289:5: error: 'wxClassInfo' does not name a type
/usr/local/include/wx/docview.h:245:48: error: 'wxClassInfo' was not declared in this scope
/usr/local/include/wx/docview.h:245:61: error: expected primary-expression before ')' token
/usr/local/include/wx/docview.h:246:49: error: 'wxClassInfo' was not declared in this scope
/usr/local/include/wx/docview.h:246:62: error: expected primary-expression before ')' token
In file included from /usr/local/include/wx/icon.h:15:0,
                 from /usr/local/include/wx/app.h:31,
                 from /usr/local/include/wx/wx.h:24,
                 from MainApp.h:15,
                 from GUICircuit.h:20,
                 from CircuitParse.h:17,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/gtk/icon.h: In member function 'bool wxIcon::operator==(const wxIcon&) const':
/usr/local/include/wx/gtk/icon.h:49:56: error: 'm_refData' was not declared in this scope
/usr/local/include/wx/gtk/icon.h:49:74: error: 'const class wxIcon' has no member named 'm_refData'
In file included from /usr/local/include/wx/generic/textdlgg.h:24:0,
                 from /usr/local/include/wx/textdlg.h:4,
                 from /usr/local/include/wx/wx.h:78,
                 from MainApp.h:15,
                 from GUICircuit.h:20,
                 from CircuitParse.h:17,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/valtext.h: In member function 'bool wxTextValidator::CheckValidator() const':
/usr/local/include/wx/valtext.h:91:9: error: expected primary-expression before ')' token
/usr/local/include/wx/valtext.h:91:9: error: 'CLASSINFO' was not declared in this scope
In file included from /usr/local/include/wx/socket.h:34:0,
                 from /usr/local/include/wx/protocol/protocol.h:28,
                 from /usr/local/include/wx/url.h:24,
                 from /usr/local/include/wx/filesys.h:30,
                 from /usr/local/include/wx/html/helpdata.h:25,
                 from /usr/local/include/wx/html/helpfrm.h:23,
                 from /usr/local/include/wx/html/helpctrl.h:23,
                 from /usr/local/include/wx/help.h:16,
                 from MainApp.h:19,
                 from GUICircuit.h:20,
                 from CircuitParse.h:17,
                 from CircuitParse.cpp:11:
/usr/local/include/wx/sckaddr.h: At global scope:
/usr/local/include/wx/sckaddr.h:30:34: error: expected identifier before numeric constant
/usr/local/include/wx/sckaddr.h:30:34: error: expected '}' before numeric constant
/usr/local/include/wx/sckaddr.h:30:34: error: expected unqualified-id before numeric constant
/usr/local/include/wx/sckaddr.h:32:17: error: expected unqualified-id before ')' token
/usr/local/include/wx/sckaddr.h:33:17: error: expected unqualified-id before 'const'
/usr/local/include/wx/sckaddr.h:33:17: error: expected ')' before 'const'
/usr/local/include/wx/sckaddr.h:34:26: error: declaration of '~wxSockAddress' as non-member
/usr/local/include/wx/sckaddr.h:36:54: error: 'wxSockAddress& operator=(const wxSockAddress&)' must be a nonstatic member function
/usr/local/include/wx/sckaddr.h:38:22: error: 'virtual' outside class declaration
/usr/local/include/wx/sckaddr.h:39:20: error: 'virtual' outside class declaration
/usr/local/include/wx/sckaddr.h:39:24: error: function 'int Type()' is initialized like a variable
/usr/local/include/wx/sckaddr.h:41:26: error: non-member function 'GAddress* GetAddress()' cannot have cv-qualifier
/usr/local/include/wx/sckaddr.h: In function 'GAddress* GetAddress()':
/usr/local/include/wx/sckaddr.h:41:41: error: 'm_address' was not declared in this scope
/usr/local/include/wx/sckaddr.h: At global scope:
/usr/local/include/wx/sckaddr.h:46:34: error: 'virtual' outside class declaration
/usr/local/include/wx/sckaddr.h:46:34: error: non-member function 'wxSockAddress* Clone()' cannot have cv-qualifier
/usr/local/include/wx/sckaddr.h:46:42: error: function 'wxSockAddress* Clone()' is initialized like a variable
/usr/local/include/wx/sckaddr.h:48:1: error: expected unqualified-id before 'protected'
/usr/local/include/wx/sckaddr.h:51:1: error: expected unqualified-id before 'private'
/usr/local/include/wx/sckaddr.h:53:1: error: expected declaration before '}' token
make[1]: *** [CircuitParse.o] Error 1
make[1]: Leaving directory `/home/shaos/src/cedar-logic/GUI'
make: *** [all] Error 2


Похоже у меня битая сборка wxWidgets?...

P.S. это из-за макроса UNIX - оно точно надо?

P.P.S. заменил макрос UNIX на MYUNIX, теперь запинается в другом месте:

Code:
g++ -I/usr/local/lib/wx/include/gtk-2.4 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -I/usr/include/boost -I../tinyxml2 -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14   -Wall -Wno-deprecated -DMYUNIX -ggdb3 -c -o CircuitParse.o CircuitParse.cpp
In file included from GUICanvas.h:26:0,
                 from GUICircuit.h:22,
                 from CircuitParse.h:17,
                 from CircuitParse.cpp:11:
klsGLCanvas.h:63:1: error: expected class-name before '{' token
klsGLCanvas.h: In member function 'void klsGLCanvas::setMouseCoords()':
klsGLCanvas.h:174:23: error: 'GetClientSize' was not declared in this scope
In file included from OscopeFrame.h:23:0,
                 from GUICircuit.h:23,
                 from CircuitParse.h:17,
                 from CircuitParse.cpp:11:
OscopeCanvas.h: At global scope:
OscopeCanvas.h:35:1: error: expected class-name before '{' token
make: *** [CircuitParse.o] Error 1

_________________
:dj: https://mastodon.social/@Shaos


15 Aug 2012 05:33
Profile WWW
Senior

Joined: 07 Aug 2006 10:18
Posts: 185
Reply with quote
Post 
Мне кажется, что дело не в версии wxWidgets, а в том, с какими опциями был вызван configure при её сборке. По-крайней мере на эту мысль меня наталкивают фразы вида "#error wxUSE_* must be defined". Правда там их столько, что (если я их правильно понимаю) единственный вывод, который можно сделать: wx вообще собрана без поддержки GUI. =)

А вот фраза о том, что operator[] cant be overloaded, меня честно говоря озадачивает... Думаю дело в том, что платформа 32-bit, и size_t -- этот тот же unsigned int только под другим именем. И получается, что wx не перегружает функцию, а повторно определяет. Хотя я не уверен.
Но я тут высмотрел в info gcc такой флаг для g++, как -fpermissive. Попробуй его добавить к CXXFLAGS. Пробовать как этот флаг работает на практике я не пробовал, но в мануале написано, что g++ начинает компилировать код, который настоящий ANSI компилятор не должен компилировать.


15 Aug 2012 06:55
Profile
Senior

Joined: 07 Aug 2006 10:18
Posts: 185
Reply with quote
Post 
Это не код а ппц какой-то. Вчера, наверное, в течение часа, пытался выяснить, почему тут рисует, а там не рисует, и выясняется, что в этом долбаном коде местами не работают, казалось бы, совершенно безобидные вещи. Вот есть такое:
Code:
glMatrixMode(GL_MODELVIEW);

   // Set up the forward matrix:
   glLoadIdentity();
   glTranslatef(x, y, 0);
   glGetDoublev( GL_MODELVIEW_MATRIX, mModel );

   for(int row = 0; row < 4; row ++) {
      for(int col = 0; col < 4; col ++) {
         printf("%6.3lf", mModel[row + col * 4]);
      }
      printf("\n");
   }
На входе, x=1 и y=1, но на выходе:
Code:
 0,000 0,000 0,000 0,000
 0,000 0,000 0,000 0,000
 0,000 0,000 0,000 0,000
 0,000 0,000 0,000 0,000
Я уже даже начал сомневаться в том, что у меня OpenGL в системе рабочий, и задумался о том, чтобы поискать в шкафу видяшку nvidia... Дык нет же, тестовая _самостоятельная_ программка пишет всё как надо:
Code:
#include <GL/glut.h>
#include <stdio.h>

int main(int argc, char *argv[])
{
   float x = 1, y = 1;
   GLdouble mModel[16];
   glutInit(&argc, argv);
   glutCreateWindow("");
   
   glMatrixMode(GL_MODELVIEW);

   // Set up the forward matrix:
   glLoadIdentity();
   glTranslatef(x, y, 0);
   glGetDoublev( GL_MODELVIEW_MATRIX, mModel );
   
   for(int row = 0; row < 4; row ++) {
      for(int col = 0; col < 4; col ++) {
         printf("%6.3lf", mModel[row + col * 4]);
      }
      printf("\n");
   }
   return 0;
}
Code:
$ ./test-gl
 1.000 0.000 0.000 1.000
 0.000 1.000 0.000 1.000
 0.000 0.000 1.000 0.000
 0.000 0.000 0.000 1.000


Единственное что радует -- вероятно это та самая причина, по которой, практически нигде нет картинок элементов. А поскольку пути решения проблемы достаточно очевидны, можно надеятся, что сегодня я-таки получу полноценно работающий гуй, и можно будет, наконец, посмотреть работает ли симуляция логики.


16 Aug 2012 00:50
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 235 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6 ... 16  Next

Who is online

Users browsing this forum: No registered users and 27 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.