jonseijo / text-editor Goto Github PK
View Code? Open in Web Editor NEWText editor with GUI made in c++
License: MIT License
Text editor with GUI made in c++
License: MIT License
Very useful feature for text editors
Hello,
I just wanted to let you know that I encountered linker errors when compiling your project on Fedora 39 using manually installed SFML 2.5.1 (See below for the error message).
Switching to SFML 2.6.1 and updating the Makefile and run.sh for version 2.6.1 fixed the compilation issues.
Error Message:
(I removed -Werror
from the Makefile)
> /text-editor/ $ make
g++ -O2 -march=native -Wall -Wextra -pedantic -std=c++23 -L /usr/local/lib/SFML-2.5.1/lib -I /usr/local/lib/SFML-2.5.1/include -MMD -c src/TextDocument.cpp -I src/ -o build/src/TextDocument.o
In file included from /usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.hpp:731,
from /usr/local/lib/SFML-2.5.1/include/SFML/System/String.hpp:32,
from /usr/local/lib/SFML-2.5.1/include/SFML/System.hpp:42,
from /usr/local/lib/SFML-2.5.1/include/SFML/Window.hpp:32,
from /usr/local/lib/SFML-2.5.1/include/SFML/Graphics.hpp:32,
from src/TextDocument.h:4,
from src/TextDocument.cpp:1:
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl: In static member function ‘static In sf::Utf<8>::decode(In, In, sf::Uint32&, sf::Uint32) [with In = __gnu_cxx::__normal_iterator<const char*, std::__cxx11::basic_string<char> >]’:
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:65:68: warning: this statement may fall through [-Wimplicit-fallthrough=]
65 | case 5: output += static_cast<Uint8>(*begin++); output <<= 6;
| ~~~~~~~^~~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:66:13: note: here
66 | case 4: output += static_cast<Uint8>(*begin++); output <<= 6;
| ^~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:66:68: warning: this statement may fall through [-Wimplicit-fallthrough=]
66 | case 4: output += static_cast<Uint8>(*begin++); output <<= 6;
| ~~~~~~~^~~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:67:13: note: here
67 | case 3: output += static_cast<Uint8>(*begin++); output <<= 6;
| ^~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:67:68: warning: this statement may fall through [-Wimplicit-fallthrough=]
67 | case 3: output += static_cast<Uint8>(*begin++); output <<= 6;
| ~~~~~~~^~~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:68:13: note: here
68 | case 2: output += static_cast<Uint8>(*begin++); output <<= 6;
| ^~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:68:68: warning: this statement may fall through [-Wimplicit-fallthrough=]
68 | case 2: output += static_cast<Uint8>(*begin++); output <<= 6;
| ~~~~~~~^~~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:69:13: note: here
69 | case 1: output += static_cast<Uint8>(*begin++); output <<= 6;
| ^~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:69:68: warning: this statement may fall through [-Wimplicit-fallthrough=]
69 | case 1: output += static_cast<Uint8>(*begin++); output <<= 6;
| ~~~~~~~^~~~~
/usr/local/lib/SFML-2.5.1/include/SFML/System/Utf.inl:70:13: note: here
70 | case 0: output += static_cast<Uint8>(*begin++);
| ^~~~
g++ -O2 -march=native -Wall -Wextra -pedantic -std=c++23 -L /usr/local/lib/SFML-2.5.1/lib -I /usr/local/lib/SFML-2.5.1/include build/Editor.o build/src/Cursor.o build/src/EditorContent.o build/src/EditorView.o build/src/ImplementationUtils.o build/src/InputController.o build/src/SelectionData.o build/src/SpecialChars.o build/src/TextDocument.o -o build/editor -lsfml-graphics -lsfml-window -lsfml-system
/usr/bin/ld: build/src/EditorView.o: in function `EditorView::EditorView(sf::RenderWindow const&, sf::String const&, EditorContent&)':
EditorView.cpp:(.text+0x863): undefined reference to `sf::String::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const'
/usr/bin/ld: build/src/SpecialChars.o: in function `SpecialChars::convertSpecialChar[abi:cxx11](unsigned int, std::basic_ofstream<char, std::char_traits<char> >&)':
SpecialChars.cpp:(.text+0x3e): undefined reference to `sf::String::operator std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >() const'
collect2: error: ld returned 1 exit status
make: *** [Makefile:35: build/editor] Error 1
what is the free use license for the project?
cual es la licencia de uso gratis para tu proyecta?
podes poner la licencia en el read me?
There is a small bug, when you try to move cursor to right (via arrow keys) at the end of text - it results in std::out_of_range error.
This will also cause weird behavior where in newline characters will start appearing in the all the lines written so far.
The bug is likely in moveCursorRight
method implementation of EditorContent.cpp.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.