textadept
textadept copied to clipboard
doesn't compile using msys2 for windows
It gets stuck here
# cmake --build build_dir -j # compiled binaries are in build_dir/
[7/235] Building CXX object CMakeFiles/scintilla.dir/scintilla_autogen/mocs_compilation.cpp.obj
FAILED: CMakeFiles/scintilla.dir/scintilla_autogen/mocs_compilation.cpp.obj
C:\Users\topkek\scoop\apps\msys2\2024-01-13\ucrt64\bin\c++.exe -DSCI_LEXER -IC:/Users/topkek/scoop/persist/msys2/home/topkek/git/textadept/build_dir/scintilla_autogen/include -IC:/Users/topkek/scoop/persist/msys2/home/topkek/git/textadept/build_dir/_deps/scintilla-src/include -IC:/Users/topkek/scoop/persist/msys2/home/topkek/git/textadept/build_dir/_deps/scintilla-src/src -O2 -g -DNDEBUG -std=gnu++17 /EHsc -MD -MT CMakeFiles/scintilla.dir/scintilla_autogen/mocs_compilation.cpp.obj -MF CMakeFiles\scintilla.dir\scintilla_autogen\mocs_compilation.cpp.obj.d -o CMakeFiles/scintilla.dir/scintilla_autogen/mocs_compilation.cpp.obj -c C:/Users/topkek/scoop/persist/msys2/home/topkek/git/textadept/build_dir/scintilla_autogen/mocs_compilation.cpp
c++.exe: warning: /EHsc: linker input file unused because linking not done
c++.exe: error: /EHsc: linker input file not found: No such file or directory
[9/235] Building C object CMakeFiles/iconv.dir/_deps/iconv-src/lib/iconv.c.obj
Sorry, I don't know why this is happening. The Qt build process is a bit mystifying to me. I haven't tried building with msys2, only Visual Studio.
maybe it uses msvc flags when it should use gcc flags?
Oh, I see. Thanks for spotting that. What happens if you remove or comment out this line? https://github.com/orbitalquark/textadept/blob/eff1576f176f7a43b98cf26ed617dbac36287bd6/CMakeLists.txt#L205
Ohhh wow yeah that worked, unfortunately it seems there is a lot more to do, it seems it is best to use the prepackaged dependencies that msys brings like https://packages.msys2.org/base/mingw-w64-pdcurses https://packages.msys2.org/package/mingw-w64-libtermkey https://packages.msys2.org/base/mingw-w64-scite instead of trying to compile them itself because otherwise there are lots of patches one has to do, but it seems this is a start, thank you a lot.