Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build fail latest pull #17

Closed
davephillips opened this issue Mar 5, 2018 · 3 comments
Closed

build fail latest pull #17

davephillips opened this issue Mar 5, 2018 · 3 comments

Comments

@davephillips
Copy link

Fedora 23 Linux
Rack master (0.6.x)

Build fails with this error:

g++ -Wsuggest-override -std=c++11 -fPIC -I../../include -I../../dep/include -DSLUG=trowaSoft -DVERSION=0.6.5.2dev -MMD -g -O3 -march=nocona -ffast-math -fno-finite-math-only -Wall -Wextra -Wno-unused-parameter -DARCH_LIN -c -o build/src/TSTextField.cpp.o src/TSTextField.cpp
src/TSTextField.cpp: In member function ‘void TSTextField::insertText(std::__cxx11::string)’:
src/TSTextField.cpp:50:6: error: ‘begin’ was not declared in this scope
if (begin < end)
^
src/TSTextField.cpp:50:6: note: suggested alternative:
In file included from /usr/include/c++/5.3.1/string:51:0,
from ../../include/util/common.hpp:10,
from ../../include/rack.hpp:4,
from src/TSTextField.hpp:4,
from src/TSTextField.cpp:1:
/usr/include/c++/5.3.1/bits/range_access.h:87:5: note: ‘std::begin’
begin(_Tp (&__arr)[_Nm])
^
src/TSTextField.cpp:50:14: error: ‘end’ was not declared in this scope
if (begin < end)
^
src/TSTextField.cpp:50:14: note: suggested alternative:
In file included from /usr/include/c++/5.3.1/string:51:0,
from ../../include/util/common.hpp:10,
from ../../include/rack.hpp:4,
from src/TSTextField.hpp:4,
from src/TSTextField.cpp:1:
/usr/include/c++/5.3.1/bits/range_access.h:97:5: note: ‘std::end’
end(_Tp (&__arr)[_Nm])
^
src/TSTextField.cpp:53:14: error: ‘begin’ was not declared in this scope
text.insert(begin, cleansedStr);
^
src/TSTextField.cpp:53:14: note: suggested alternative:
In file included from /usr/include/c++/5.3.1/string:51:0,
from ../../include/util/common.hpp:10,
from ../../include/rack.hpp:4,
from src/TSTextField.hpp:4,
from src/TSTextField.cpp:1:
/usr/include/c++/5.3.1/bits/range_access.h:87:5: note: ‘std::begin’
begin(_Tp (&__arr)[_Nm])
^
src/TSTextField.cpp:59:2: error: ‘end’ was not declared in this scope
end = begin;
^
src/TSTextField.cpp:59:2: note: suggested alternative:
In file included from /usr/include/c++/5.3.1/string:51:0,
from ../../include/util/common.hpp:10,
from ../../include/rack.hpp:4,
from src/TSTextField.hpp:4,
from src/TSTextField.cpp:1:
/usr/include/c++/5.3.1/bits/range_access.h:97:5: note: ‘std::end’
end(_Tp (&__arr)[_Nm])
^
src/TSTextField.cpp: In member function ‘virtual void TSTextField::onTextChange()’:
src/TSTextField.cpp:65:2: error: ‘begin’ was not declared in this scope
begin = min(max(begin, 0), text.size());
^
src/TSTextField.cpp:65:2: note: suggested alternative:
In file included from /usr/include/c++/5.3.1/string:51:0,
from ../../include/util/common.hpp:10,
from ../../include/rack.hpp:4,
from src/TSTextField.hpp:4,
from src/TSTextField.cpp:1:
/usr/include/c++/5.3.1/bits/range_access.h:87:5: note: ‘std::begin’
begin(_Tp (&__arr)[_Nm])
^
src/TSTextField.cpp:66:2: error: ‘end’ was not declared in this scope
end = min(max(end, 0), text.size());
^
src/TSTextField.cpp:66:2: note: suggested alternative:
In file included from /usr/include/c++/5.3.1/string:51:0,
from ../../include/util/common.hpp:10,
from ../../include/rack.hpp:4,
from src/TSTextField.hpp:4,
from src/TSTextField.cpp:1:
/usr/include/c++/5.3.1/bits/range_access.h:97:5: note: ‘std::end’
end(_Tp (&__arr)[_Nm])
^
src/TSTextField.cpp: In member function ‘virtual void TSTextField::onKey(rack::EventKey&)’:
src/TSTextField.cpp:81:7: error: ‘begin’ was not declared in this scope
if (begin < end) {
^
src/TSTextField.cpp:81:7: note: suggested alternative:
In file included from /usr/include/c++/5.3.1/string:51:0,
from ../../include/util/common.hpp:10,
from ../../include/rack.hpp:4,
from src/TSTextField.hpp:4,
from src/TSTextField.cpp:1:
/usr/include/c++/5.3.1/bits/range_access.h:87:5: note: ‘std::begin’
begin(_Tp (&__arr)[_Nm])
^
src/TSTextField.cpp:81:15: error: ‘end’ was not declared in this scope
if (begin < end) {
^
src/TSTextField.cpp:81:15: note: suggested alternative:
In file included from /usr/include/c++/5.3.1/string:51:0,
from ../../include/util/common.hpp:10,
from ../../include/rack.hpp:4,
from src/TSTextField.hpp:4,
from src/TSTextField.cpp:1:
/usr/include/c++/5.3.1/bits/range_access.h:97:5: note: ‘std::end’
end(_Tp (&__arr)[_Nm])
^
src/TSTextField.cpp:92:3: error: ‘end’ was not declared in this scope
end = begin;
^
src/TSTextField.cpp:92:3: note: suggested alternative:
In file included from /usr/include/c++/5.3.1/string:51:0,
from ../../include/util/common.hpp:10,
from ../../include/rack.hpp:4,
from src/TSTextField.hpp:4,
from src/TSTextField.cpp:1:
/usr/include/c++/5.3.1/bits/range_access.h:97:5: note: ‘std::end’
end(_Tp (&__arr)[_Nm])
^
src/TSTextField.cpp:92:9: error: ‘begin’ was not declared in this scope
end = begin;
^
src/TSTextField.cpp:92:9: note: suggested alternative:
In file included from /usr/include/c++/5.3.1/string:51:0,
from ../../include/util/common.hpp:10,
from ../../include/rack.hpp:4,
from src/TSTextField.hpp:4,
from src/TSTextField.cpp:1:
/usr/include/c++/5.3.1/bits/range_access.h:87:5: note: ‘std::begin’
begin(_Tp (&__arr)[_Nm])
^
src/TSTextField.cpp:181:3: error: ‘begin’ was not declared in this scope
begin = min(max(begin, 0), text.size());
^
src/TSTextField.cpp:181:3: note: suggested alternative:
In file included from /usr/include/c++/5.3.1/string:51:0,
from ../../include/util/common.hpp:10,
from ../../include/rack.hpp:4,
from src/TSTextField.hpp:4,
from src/TSTextField.cpp:1:
/usr/include/c++/5.3.1/bits/range_access.h:87:5: note: ‘std::begin’
begin(_Tp (&__arr)[_Nm])
^
src/TSTextField.cpp:182:3: error: ‘end’ was not declared in this scope
end = min(max(end, 0), text.size());
^
src/TSTextField.cpp:182:3: note: suggested alternative:
In file included from /usr/include/c++/5.3.1/string:51:0,
from ../../include/util/common.hpp:10,
from ../../include/rack.hpp:4,
from src/TSTextField.hpp:4,
from src/TSTextField.cpp:1:
/usr/include/c++/5.3.1/bits/range_access.h:97:5: note: ‘std::end’
end(_Tp (&__arr)[_Nm])
^
../../compile.mk:59: recipe for target 'build/src/TSTextField.cpp.o' failed
make: *** [build/src/TSTextField.cpp.o] Error 1

Any suggestions for a fix ?

@chichian
Copy link
Collaborator

chichian commented Mar 5, 2018

Hmmm. Those members (begin and end) should be defined in the base class (Rack's Textfield)....

It seems like the class has changed. I will have to re-work it later.

For now, you could try to just define them in the struct (TSTextField.hpp):

struct TSTextField : TextField {
	int begin = 0; // ADD THIS MEMBER
	int end = 0; // ADD THIS MEMBER
	// Maximum length allowed.
	uint16_t maxLength = 50;

@davephillips
Copy link
Author

Hey, you officially rock ! Thanks for the news and the fix, I have your modules built and running in the latest Rack master. Best regards !

@chichian
Copy link
Collaborator

chichian commented Mar 5, 2018

Thank you for pointing that out. I'm glad that's all it needed :-).

@j4s0n-c j4s0n-c closed this as completed Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants