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

Windows port #101

Open
efa opened this issue Jan 9, 2023 · 5 comments
Open

Windows port #101

efa opened this issue Jan 9, 2023 · 5 comments

Comments

@efa
Copy link

efa commented Jan 9, 2023

Did exist a version for MS Windows?
Compiled with Cygwin or even MinGW/Msys2 ?

Are you interested in such port?

@efa
Copy link
Author

efa commented Jan 11, 2023

I made some tests with Cygwin as it is easier to port something than MinGW/MSYS2.

With some simple patches (back compatible with Debian 11) I can build the following libs:

transcript
t3config
t3key
t3highlight
t3window

while for t3widgets seems it depends strictly on libgpm-dev (on Linux too) and as now I cannot build it, and so cannot build tilde package.

Any suggestions?

@efa
Copy link
Author

efa commented Jan 12, 2023

without:

CXXFLAGS += -DHAS_GPM
LDLIBS.libt3widget.la += -lgpm

in t3widgets/src/Makefile I got this error:

[CXXLT] clipboard.cc
In file included from clipboard.cc:35:
internal.h:129:22: error: variable or field 'fd_set_mouse_fd' declared void
  129 | T3_WIDGET_LOCAL void fd_set_mouse_fd(fd_set *readset, int *max_fd);
      |                      ^~~~~~~~~~~~~~~
internal.h:129:38: error: 'fd_set' was not declared in this scope
  129 | T3_WIDGET_LOCAL void fd_set_mouse_fd(fd_set *readset, int *max_fd);
      |                                      ^~~~~~
internal.h:129:46: error: 'readset' was not declared in this scope
  129 | T3_WIDGET_LOCAL void fd_set_mouse_fd(fd_set *readset, int *max_fd);
      |                                              ^~~~~~~

probably because t3widgets/src/internal.h at line 129 has:

T3_WIDGET_LOCAL void fd_set_mouse_fd(fd_set *readset, int *max_fd);

and fd_set_mouse_fd, fd_set and readset
are not resolved on Cygwin.

Adding unconditional (seems HAS_SELECT_H is not defined on Cygwin):
#include <sys/select.h>
to internal.h
file clipboard.cc compile, but compilation end with another error on key.cc
Will made other tests

Note: On Debian removing

CXXFLAGS += -DHAS_GPM
LDLIBS.libt3widget.la += -lgpm

build always work

@efa
Copy link
Author

efa commented Jan 13, 2023

t3widgets now compile.

tilde build immediately stop:

...
[CXX] attributemap.cc

../../t3shared/../t3shared/include/t3widget/string_view.h:323:58: error: declaration of 'constexpr const size_type t3widget::basic_string_view<CharT, Traits>::npos' outside of class is not definition [-fpermissive]
  323 |     basic_string_view<CharT, Traits>::size_type basic_string_view<CharT, Traits>::npos;
      |                                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@gphalkes
Copy link
Owner

It seems there was a bug in the t3wdiget/string_view.h header, which was permitted in some cases but not with some more strict settings of the compiler. I've removed the offending definition so if you sync your t3shared repository, this error should no longer occur.

@efa
Copy link
Author

efa commented Jan 24, 2023

goes over to string_view.h:323
after many warning, building tilde I got this other error:

../../t3shared/../t3shared/include/t3widget/string_view.h:502:50: error: function 'basic_ostream<_CharT, _Traits> & t3widget::operator<<(basic_ostream<_CharT, _Traits> &, t3widget::basic_string_view<CharT, Traits>)' definition is marked dllimport
  502 | T3_WIDGET_API basic_ostream<CharT, Traits> &operator<<(basic_ostream<CharT, Traits> &os,
      |                                                  ^~~~~~~~
make: *** [../../makesys/rules.mk:327: .objects/attributemap.o] Error 1

sorry my level of C++ is 1%

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

2 participants