firmata / firmata_test

Test application for the firmata protocol
33 stars 22 forks source link

Cannot successfully build on Ubuntu 12.04 LTS #2

Open cefn opened 11 years ago

cefn commented 11 years ago

Tried to rebuild firmata_test from source, modifying the path to wx-config to point to my own system wx-config (the Makefile seems to have the author's directory structure hard-coded into it).

I'm on a relatively vanilla Ubuntu Precise machine and just trying to find what in the repositories or makefile needs to be updated to get it to play ball.

Unfortunately I get a series of errors, whether building against wx2.6 or wx2.8 even when libwxgtk2.x-dev and libwxgtk2.x-dbg are both installed.

The errors are the sort of thing which I'm sure someone working with wx might recognise, but I can't figure what could fundamentally be wrong with code which built happily against previous wx versions, though something around Unicode support has been discussed, which suggests similar errors, but adding the flags...

wxUSE_UNICODE=1
wxUSE_UNICODE=0

or going through adding the wxT(...) macro around every literal string, following the Unicode guidance linked from http://wiki.wxwidgets.org/WxWidgets_Build_Configurations still leaves me with lots of errors such as...

serial.cpp:83:1: error: ‘Lname’ was not declared in this scope
...
serial.cpp:100:31: error: invalid conversion from ‘char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
...
/usr/include/wx-2.8/wx/string.h:1422:27: error:   initialising argument 2 of ‘wxString operator+(const wxString&, wxChar)’ [-fpermissive]
...
serial.cpp:284:14: error: ambiguous overload for ‘operator=’ in ‘((Serial*)this)->Serial::port_name = ""’

The full set of errors from attempting to compile the original source on Ubuntu Precise look like this, though some of these errors are eliminated by using the unicode wxT() macro around literals, most aren't.

make (in directory: /home/cefn/Documents/code/xxx/firmata_test-cefn)
g++  -O2 -Wall -Wno-strict-aliasing `wx-config --cppflags` -DLINUX  -c -o firmata_test.o firmata_test.cpp
g++  -O2 -Wall -Wno-strict-aliasing `wx-config --cppflags` -DLINUX  -c -o serial.o serial.cpp
In file included from serial.cpp:20:0:
firmata_test.h:70:33: error: default argument for parameter of type ‘const wxString&’ has type ‘const char [1]’
In file included from firmata_test.cpp:24:0:
firmata_test.h:70:33: error: default argument for parameter of type ‘const wxString&’ has type ‘const char [1]’
serial.cpp: In member function ‘int Serial::Open(const wxString&)’:
serial.cpp:83:61: error: cannot convert ‘const wxChar* {aka const wchar_t*}’ to ‘const char*’ for argument ‘1’ to ‘int open(const char*, int, ...)’
serial.cpp:86:38: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1423:27: error:   initialising argument 1 of ‘wxString operator+(wxChar, const wxString&)’ [-fpermissive]
serial.cpp:86:45: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1422:27: error:   initialising argument 2 of ‘wxString operator+(const wxString&, wxChar)’ [-fpermissive]
serial.cpp:90:36: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1423:27: error:   initialising argument 1 of ‘wxString operator+(wxChar, const wxString&)’ [-fpermissive]
serial.cpp:91:5: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1422:27: error:   initialising argument 2 of ‘wxString operator+(const wxString&, wxChar)’ [-fpermissive]
serial.cpp:93:36: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1423:27: error:   initialising argument 1 of ‘wxString operator+(wxChar, const wxString&)’ [-fpermissive]
serial.cpp:94:5: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1422:27: error:   initialising argument 2 of ‘wxString operator+(const wxString&, wxChar)’ [-fpermissive]
serial.cpp:96:36: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1423:27: error:   initialising argument 1 of ‘wxString operator+(wxChar, const wxString&)’ [-fpermissive]
serial.cpp:97:5: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1422:27: error:   initialising argument 2 of ‘wxString operator+(const wxString&, wxChar)’ [-fpermissive]
serial.cpp:99:36: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1423:27: error:   initialising argument 1 of ‘wxString operator+(wxChar, const wxString&)’ [-fpermissive]
serial.cpp:100:5: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1422:27: error:   initialising argument 2 of ‘wxString operator+(const wxString&, wxChar)’ [-fpermissive]
firmata_test.cpp: In constructor ‘MyFrame::MyFrame(wxWindow*, wxWindowID, const wxString&, const wxPoint&, const wxSize&, long int)’:
firmata_test.cpp:89:37: error: conversion from ‘const char [5]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:89:37: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [5]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [5]’ to ‘int’
/usr/include/wx-2.8/wx/menu.h:62:17: error:   initialising argument 2 of ‘wxMenuItem* wxMenuBase::Append(int, const wxString&, const wxString&, wxItemKind)’
serial.cpp:100:26: error: invalid conversion from ‘char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1422:27: error:   initialising argument 2 of ‘wxString operator+(const wxString&, wxChar)’ [-fpermissive]
firmata_test.cpp:90:30: error: conversion from ‘const char [5]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:90:30: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [5]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [5]’ to ‘int’
/usr/include/wx-2.8/wx/gtk/menu.h:27:18: error:   initialising argument 2 of ‘virtual bool wxMenuBar::Append(wxMenu*, const wxString&)’
firmata_test.cpp:92:30: error: conversion from ‘const char [5]’ to ‘const wxString’ is ambiguous
serial.cpp:106:15: error: ambiguous overload for ‘operator=’ in ‘((Serial*)this)->Serial::error_msg = "Unable to query serial port signals"’
firmata_test.cpp:92:30: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
serial.cpp:106:15: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [5]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:676:13: note: wxString& wxString::operator=(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:676:13: note:   no known conversion for argument 1 from ‘const char [36]’ to ‘int’
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [5]’ to ‘int’
/usr/include/wx-2.8/wx/string.h:956:13: note: wxString& wxString::operator=(wxChar) <near match>
/usr/include/wx-2.8/wx/gtk/menu.h:27:18: error:   initialising argument 2 of ‘virtual bool wxMenuBar::Append(wxMenu*, const wxString&)’
/usr/include/wx-2.8/wx/string.h:956:13: note:   no known conversion for argument 1 from ‘const char [36]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:970:13: note: wxString& wxString::operator=(const wxWCharBuffer&) <near match>
/usr/include/wx-2.8/wx/string.h:970:13: note:   no known conversion for argument 1 from ‘const char [36]’ to ‘const wxWCharBuffer&’
/usr/include/wx-2.8/wx/string.h:659:24: note: wxString& wxString::operator=(const wxString&) <near match>
/usr/include/wx-2.8/wx/string.h:659:24: note:   no known conversion for argument 1 from ‘const char [36]’ to ‘const wxString&’
serial.cpp:112:15: error: ambiguous overload for ‘operator=’ in ‘((Serial*)this)->Serial::error_msg = "Unable to control serial port signals"’
serial.cpp:112:15: note: candidates are:
/usr/include/wx-2.8/wx/string.h:676:13: note: wxString& wxString::operator=(int) <near match>
/usr/include/wx-2.8/wx/string.h:676:13: note:   no known conversion for argument 1 from ‘const char [38]’ to ‘int’
/usr/include/wx-2.8/wx/string.h:956:13: note: wxString& wxString::operator=(wxChar) <near match>
/usr/include/wx-2.8/wx/string.h:956:13: note:   no known conversion for argument 1 from ‘const char [38]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:970:13: note: wxString& wxString::operator=(const wxWCharBuffer&) <near match>
/usr/include/wx-2.8/wx/string.h:970:13: note:   no known conversion for argument 1 from ‘const char [38]’ to ‘const wxWCharBuffer&’
/usr/include/wx-2.8/wx/string.h:659:24: note: wxString& wxString::operator=(const wxString&) <near match>
/usr/include/wx-2.8/wx/string.h:659:24: note:   no known conversion for argument 1 from ‘const char [38]’ to ‘const wxString&’
serial.cpp:117:15: error: ambiguous overload for ‘operator=’ in ‘((Serial*)this)->Serial::error_msg = "Unable to query serial port settings (perhaps not a serial port)"’
serial.cpp:117:15: note: candidates are:
/usr/include/wx-2.8/wx/string.h:676:13: note: wxString& wxString::operator=(int) <near match>
/usr/include/wx-2.8/wx/string.h:676:13: note:   no known conversion for argument 1 from ‘const char [65]’ to ‘int’
/usr/include/wx-2.8/wx/string.h:956:13: note: wxString& wxString::operator=(wxChar) <near match>
/usr/include/wx-2.8/wx/string.h:956:13: note:   no known conversion for argument 1 from ‘const char [65]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:970:13: note: wxString& wxString::operator=(const wxWCharBuffer&) <near match>
/usr/include/wx-2.8/wx/string.h:970:13: note:   no known conversion for argument 1 from ‘const char [65]’ to ‘const wxWCharBuffer&’
/usr/include/wx-2.8/wx/string.h:659:24: note: wxString& wxString::operator=(const wxString&) <near match>
/usr/include/wx-2.8/wx/string.h:659:24: note:   no known conversion for argument 1 from ‘const char [65]’ to ‘const wxString&’
firmata_test.cpp: In member function ‘void MyFrame::init_data()’:
firmata_test.cpp:125:17: error: ambiguous overload for ‘operator=’ in ‘firmata_name = ""’
firmata_test.cpp:125:17: note: candidates are:
serial.cpp: In member function ‘wxString Serial::get_name()’:
serial.cpp:260:28: error: conversion from ‘const char*’ to ‘wxString’ is ambiguous
/usr/include/wx-2.8/wx/string.h:676:13: note: wxString& wxString::operator=(int) <near match>serial.cpp:260:28: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>/usr/include/wx-2.8/wx/string.h:676:13: note:   no known conversion for argument 1 from ‘const char [1]’ to ‘int’
/usr/include/wx-2.8/wx/string.h:956:13: note: wxString& wxString::operator=(wxChar) <near match>/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char*’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:956:13: note:   no known conversion for argument 1 from ‘const char [1]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char*’ to ‘int’
/usr/include/wx-2.8/wx/string.h:970:13: note: wxString& wxString::operator=(const wxWCharBuffer&) <near match>
/usr/include/wx-2.8/wx/string.h:970:13: note:   no known conversion for argument 1 from ‘const char [1]’ to ‘const wxWCharBuffer&’
/usr/include/wx-2.8/wx/string.h:659:24: note: wxString& wxString::operator=(const wxString&) <near match>
/usr/include/wx-2.8/wx/string.h:659:24: note:   no known conversion for argument 1 from ‘const char [1]’ to ‘const wxString&’
serial.cpp: In member function ‘void Serial::Close()’:
serial.cpp:284:14: error: ambiguous overload for ‘operator=’ in ‘((Serial*)this)->Serial::port_name = ""’
serial.cpp:284:14: note: candidates are:
/usr/include/wx-2.8/wx/string.h:676:13: note: wxString& wxString::operator=(int) <near match>
/usr/include/wx-2.8/wx/string.h:676:13: note:   no known conversion for argument 1 from ‘const char [1]’ to ‘int’
/usr/include/wx-2.8/wx/string.h:956:13: note: wxString& wxString::operator=(wxChar) <near match>
/usr/include/wx-2.8/wx/string.h:956:13: note:   no known conversion for argument 1 from ‘const char [1]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:970:13: note: wxString& wxString::operator=(const wxWCharBuffer&) <near match>
/usr/include/wx-2.8/wx/string.h:970:13: note:   no known conversion for argument 1 from ‘const char [1]’ to ‘const wxWCharBuffer&’
/usr/include/wx-2.8/wx/string.h:659:24: note: wxString& wxString::operator=(const wxString&) <near match>
/usr/include/wx-2.8/wx/string.h:659:24: note:   no known conversion for argument 1 from ‘const char [1]’ to ‘const wxString&’
firmata_test.cpp: In member function ‘void MyFrame::add_item_to_grid(int, int, wxWindow*)’:
firmata_test.cpp:148:46: error: conversion from ‘const char [1]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:148:46: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [1]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [1]’ to ‘int’
/usr/include/wx-2.8/wx/gtk/stattext.h:21:5: error:   initialising argument 3 of ‘wxStaticText::wxStaticText(wxWindow*, wxWindowID, const wxString&, const wxPoint&, const wxSize&, long int, const wxString&)’
firmata_test.cpp: In member function ‘void MyFrame::add_pin(int)’:
firmata_test.cpp:175:27: error: no matching function for call to ‘wxString::Printf(const char [7], int&)’
firmata_test.cpp:175:27: note: candidate is:
/usr/include/wx-2.8/wx/string.h:1203:7: note: int wxString::Printf(const wxChar*, ...)
/usr/include/wx-2.8/wx/string.h:1203:7: note:   no known conversion for argument 1 from ‘const char [7]’ to ‘const wxChar* {aka const wchar_t*}’
firmata_test.cpp:180:71: error: conversion from ‘const char [6]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:180:71: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [6]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [6]’ to ‘int’
/usr/include/wx-2.8/wx/arrstr.h:186:10: error:   initialising argument 1 of ‘size_t wxArrayString::Add(const wxString&, size_t)’
firmata_test.cpp:181:73: error: conversion from ‘const char [7]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:181:73: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [7]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [7]’ to ‘int’
/usr/include/wx-2.8/wx/arrstr.h:186:10: error:   initialising argument 1 of ‘size_t wxArrayString::Add(const wxString&, size_t)’
firmata_test.cpp:182:73: error: conversion from ‘const char [7]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:182:73: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [7]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [7]’ to ‘int’
/usr/include/wx-2.8/wx/arrstr.h:186:10: error:   initialising argument 1 of ‘size_t wxArrayString::Add(const wxString&, size_t)’
firmata_test.cpp:183:67: error: conversion from ‘const char [4]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:183:67: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [4]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [4]’ to ‘int’
/usr/include/wx-2.8/wx/arrstr.h:186:10: error:   initialising argument 1 of ‘size_t wxArrayString::Add(const wxString&, size_t)’
firmata_test.cpp:184:71: error: conversion from ‘const char [6]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:184:71: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [6]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [6]’ to ‘int’
/usr/include/wx-2.8/wx/arrstr.h:186:10: error:   initialising argument 1 of ‘size_t wxArrayString::Add(const wxString&, size_t)’
firmata_test.cpp:188:73: error: conversion from ‘const char [6]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:188:73: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [6]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [6]’ to ‘int’
/usr/include/wx-2.8/wx/ctrlsub.h:72:10: error:   initialising argument 1 of ‘bool wxItemContainerImmutable::SetStringSelection(const wxString&)’
firmata_test.cpp:189:75: error: conversion from ‘const char [7]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:189:75: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [7]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [7]’ to ‘int’
/usr/include/wx-2.8/wx/ctrlsub.h:72:10: error:   initialising argument 1 of ‘bool wxItemContainerImmutable::SetStringSelection(const wxString&)’
firmata_test.cpp:190:75: error: conversion from ‘const char [7]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:190:75: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [7]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [7]’ to ‘int’
/usr/include/wx-2.8/wx/ctrlsub.h:72:10: error:   initialising argument 1 of ‘bool wxItemContainerImmutable::SetStringSelection(const wxString&)’
firmata_test.cpp:191:69: error: conversion from ‘const char [4]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:191:69: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [4]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [4]’ to ‘int’
/usr/include/wx-2.8/wx/ctrlsub.h:72:10: error:   initialising argument 1 of ‘bool wxItemContainerImmutable::SetStringSelection(const wxString&)’
firmata_test.cpp:192:73: error: conversion from ‘const char [6]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:192:73: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [6]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [6]’ to ‘int’
/usr/include/wx-2.8/wx/ctrlsub.h:72:10: error:   initialising argument 1 of ‘bool wxItemContainerImmutable::SetStringSelection(const wxString&)’
firmata_test.cpp: In member function ‘void MyFrame::UpdateStatus()’:
firmata_test.cpp:206:35: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1422:27: error:   initialising argument 2 of ‘wxString operator+(const wxString&, wxChar)’ [-fpermissive]
serial.cpp: In member function ‘wxArrayString Serial::port_list()’:
serial.cpp:781:35: error: conversion from ‘char [512]’ to ‘const wxString’ is ambiguous
serial.cpp:753:7: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘char [512]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘char [512]’ to ‘int’
/usr/include/wx-2.8/wx/arrstr.h:186:10: error:   initialising argument 1 of ‘size_t wxArrayString::Add(const wxString&, size_t)’
serial.cpp:807:13: error: conversion from ‘char [512]’ to ‘const wxString’ is ambiguous
serial.cpp:753:7: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘char [512]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘char [512]’ to ‘int’
/usr/include/wx-2.8/wx/arrstr.h:186:10: error:   initialising argument 1 of ‘size_t wxArrayString::Add(const wxString&, size_t)’
firmata_test.cpp:207:19: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1422:27: error:   initialising argument 2 of ‘wxString operator+(const wxString&, wxChar)’ [-fpermissive]
firmata_test.cpp:210:12: error: ambiguous overload for ‘operator=’ in ‘status = "Please choose serial port"’
firmata_test.cpp:210:12: note: candidates are:
/usr/include/wx-2.8/wx/string.h:676:13: note: wxString& wxString::operator=(int) <near match>
/usr/include/wx-2.8/wx/string.h:676:13: note:   no known conversion for argument 1 from ‘const char [26]’ to ‘int’
/usr/include/wx-2.8/wx/string.h:956:13: note: wxString& wxString::operator=(wxChar) <near match>
/usr/include/wx-2.8/wx/string.h:956:13: note:   no known conversion for argument 1 from ‘const char [26]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:970:13: note: wxString& wxString::operator=(const wxWCharBuffer&) <near match>
/usr/include/wx-2.8/wx/string.h:970:13: note:   no known conversion for argument 1 from ‘const char [26]’ to ‘const wxWCharBuffer&’
/usr/include/wx-2.8/wx/string.h:659:24: note: wxString& wxString::operator=(const wxString&) <near match>
/usr/include/wx-2.8/wx/string.h:659:24: note:   no known conversion for argument 1 from ‘const char [26]’ to ‘const wxString&’
firmata_test.cpp: In member function ‘void MyFrame::OnModeChange(wxCommandEvent&)’:
firmata_test.cpp:226:26: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1104:8: error:   initialising argument 1 of ‘bool wxString::IsSameAs(wxChar, bool) const’ [-fpermissive]
firmata_test.cpp:227:27: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1104:8: error:   initialising argument 1 of ‘bool wxString::IsSameAs(wxChar, bool) const’ [-fpermissive]
firmata_test.cpp:228:27: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1104:8: error:   initialising argument 1 of ‘bool wxString::IsSameAs(wxChar, bool) const’ [-fpermissive]
firmata_test.cpp:229:24: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1104:8: error:   initialising argument 1 of ‘bool wxString::IsSameAs(wxChar, bool) const’ [-fpermissive]
firmata_test.cpp:230:26: error: invalid conversion from ‘const char*’ to ‘wxChar {aka wchar_t}’ [-fpermissive]
/usr/include/wx-2.8/wx/string.h:1104:8: error:   initialising argument 1 of ‘bool wxString::IsSameAs(wxChar, bool) const’ [-fpermissive]
firmata_test.cpp:245:40: error: conversion from ‘const char*’ to ‘const wxString’ is ambiguous
firmata_test.cpp:245:40: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char*’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char*’ to ‘int’
/usr/include/wx-2.8/wx/gtk/tglbtn.h:97:5: error:   initialising argument 3 of ‘wxToggleButton::wxToggleButton(wxWindow*, wxWindowID, const wxString&, const wxPoint&, const wxSize&, long int, const wxValidator&, const wxString&)’
firmata_test.cpp:250:40: error: conversion from ‘const char*’ to ‘const wxString’ is ambiguous
firmata_test.cpp:250:40: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char*’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char*’ to ‘int’
/usr/include/wx-2.8/wx/gtk/stattext.h:21:5: error:   initialising argument 3 of ‘wxStaticText::wxStaticText(wxWindow*, wxWindowID, const wxString&, const wxPoint&, const wxSize&, long int, const wxString&)’
firmata_test.cpp:258:39: error: no matching function for call to ‘wxString::Printf(const char [3], uint32_t&)’
firmata_test.cpp:258:39: note: candidate is:
/usr/include/wx-2.8/wx/string.h:1203:7: note: int wxString::Printf(const wxChar*, ...)
/usr/include/wx-2.8/wx/string.h:1203:7: note:   no known conversion for argument 1 from ‘const char [3]’ to ‘const wxChar* {aka const wchar_t*}’
firmata_test.cpp: In member function ‘void MyFrame::OnToggleButton(wxCommandEvent&)’:
firmata_test.cpp:283:39: error: conversion from ‘const char*’ to ‘const wxString’ is ambiguous
firmata_test.cpp:283:39: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char*’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char*’ to ‘int’
/usr/include/wx-2.8/wx/gtk/tglbtn.h:123:10: error:   initialising argument 1 of ‘virtual void wxToggleButton::SetLabel(const wxString&)’
firmata_test.cpp: In member function ‘void MyFrame::OnPort(wxCommandEvent&)’:
firmata_test.cpp:353:18: error: ambiguous overload for ‘operator=’ in ‘firmata_name = ""’
firmata_test.cpp:353:18: note: candidates are:
/usr/include/wx-2.8/wx/string.h:676:13: note: wxString& wxString::operator=(int) <near match>
/usr/include/wx-2.8/wx/string.h:676:13: note:   no known conversion for argument 1 from ‘const char [1]’ to ‘int’
/usr/include/wx-2.8/wx/string.h:956:13: note: wxString& wxString::operator=(wxChar) <near match>
/usr/include/wx-2.8/wx/string.h:956:13: note:   no known conversion for argument 1 from ‘const char [1]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:970:13: note: wxString& wxString::operator=(const wxWCharBuffer&) <near match>
/usr/include/wx-2.8/wx/string.h:970:13: note:   no known conversion for argument 1 from ‘const char [1]’ to ‘const wxWCharBuffer&’
/usr/include/wx-2.8/wx/string.h:659:24: note: wxString& wxString::operator=(const wxString&) <near match>
/usr/include/wx-2.8/wx/string.h:659:24: note:   no known conversion for argument 1 from ‘const char [1]’ to ‘const wxString&’
firmata_test.cpp: In member function ‘void MyFrame::DoMessage()’:
firmata_test.cpp:474:49: error: no matching function for call to ‘wxString::Printf(const char [8], int&, int&)’
firmata_test.cpp:474:49: note: candidate is:
/usr/include/wx-2.8/wx/string.h:1203:7: note: int wxString::Printf(const wxChar*, ...)
/usr/include/wx-2.8/wx/string.h:1203:7: note:   no known conversion for argument 1 from ‘const char [8]’ to ‘const wxChar* {aka const wchar_t*}’
firmata_test.cpp:494:51: error: conversion from ‘const char*’ to ‘const wxString’ is ambiguous
firmata_test.cpp:494:51: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char*’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char*’ to ‘int’
/usr/include/wx-2.8/wx/gtk/stattext.h:38:10: error:   initialising argument 1 of ‘virtual void wxStaticText::SetLabel(const wxString&)’
firmata_test.cpp:517:19: error: ambiguous overload for ‘operator=’ in ‘firmata_name = name’
firmata_test.cpp:517:19: note: candidates are:
/usr/include/wx-2.8/wx/string.h:676:13: note: wxString& wxString::operator=(int) <near match>
/usr/include/wx-2.8/wx/string.h:676:13: note:   no known conversion for argument 1 from ‘char [140]’ to ‘int’
/usr/include/wx-2.8/wx/string.h:956:13: note: wxString& wxString::operator=(wxChar) <near match>
/usr/include/wx-2.8/wx/string.h:956:13: note:   no known conversion for argument 1 from ‘char [140]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:970:13: note: wxString& wxString::operator=(const wxWCharBuffer&) <near match>
/usr/include/wx-2.8/wx/string.h:970:13: note:   no known conversion for argument 1 from ‘char [140]’ to ‘const wxWCharBuffer&’
/usr/include/wx-2.8/wx/string.h:659:24: note: wxString& wxString::operator=(const wxString&) <near match>
/usr/include/wx-2.8/wx/string.h:659:24: note:   no known conversion for argument 1 from ‘char [140]’ to ‘const wxString&’
firmata_test.cpp: In member function ‘void MyMenu::OnShowPortList(wxMenuEvent&)’:
firmata_test.cpp:638:39: error: conversion from ‘const char [8]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:638:39: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [8]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [8]’ to ‘int’
/usr/include/wx-2.8/wx/menu.h:82:17: error:   initialising argument 2 of ‘wxMenuItem* wxMenuBase::AppendRadioItem(int, const wxString&, const wxString&)’
firmata_test.cpp: In member function ‘virtual bool MyApp::OnInit()’:
firmata_test.cpp:669:93: error: conversion from ‘const char [13]’ to ‘const wxString’ is ambiguous
firmata_test.cpp:669:93: note: candidates are:
/usr/include/wx-2.8/wx/string.h:692:3: note: wxString::wxString(wxChar, size_t) <near match>
/usr/include/wx-2.8/wx/string.h:692:3: note:   no known conversion for argument 1 from ‘const char [13]’ to ‘wxChar {aka wchar_t}’
/usr/include/wx-2.8/wx/string.h:682:3: note: wxString::wxString(int) <near match>
/usr/include/wx-2.8/wx/string.h:682:3: note:   no known conversion for argument 1 from ‘const char [13]’ to ‘int’
firmata_test.cpp:79:1: error:   initialising argument 3 of ‘MyFrame::MyFrame(wxWindow*, wxWindowID, const wxString&, const wxPoint&, const wxSize&, long int)’
Compilation failed.
make: *** [serial.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [firmata_test.o] Error 1
soundanalogous commented 11 years ago

Try downloading the latest version from firmata.org. No one is keeping the firmata_test files on github up to date. The developer maintains a separate repository and I occasionally copy those files over here. You can always get the latest from firmata.org. That's just the way it is.

cefn commented 11 years ago

Thanks again for the prompt reply, Jeff

I originally started with the source linked from firmata.org, building from source using both http://www.pjrc.com/teensy/firmata_test/firmata_test_OSL.tgz (which has unicode support) and http://www.pjrc.com/teensy/firmata_test/firmata_test.tar.gz (which I guess the OSL version was based on) as listed at http://firmata.org/wiki/Main_Page#Firmata_Test_Program After both those failed with similar compile errors, I attempted to use the github version, assuming it was the latest, but I got it backwards, sorry - pjrc.com is the original code. Happy to go to any place to file the firmata_test bug, against any recommended version, with or without unicode support.

The prominence of the 'firmata_test' program at firmata.org led me to believe I should use that one as a firmata reference case, but that could be a mistake if it may not be being maintained. Happy to switch to a different set of API-based examples in any language as 'reference' examples for the use of StandardFirmata - perhaps listed in one of the "Host Software" projects at http://firmata.org/wiki/Download#Host_Software if anyone knows of an example which exercises StandardFirmata, and which is mature and representative.

Regards the bug, I think it may be more of a wxWidgets backwards-compatibility-breakage bug, and I can have a go to iron out the bugs via a wx mailing list instead. If you think it's worth using firmata_test as a reference implementation, then I'll pursue this and let you know how I get on.