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 Tolk using CMake and publish artifacts using Github workflow #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bear101
Copy link

@bear101 bear101 commented Oct 13, 2021

Here's a CMakeLists.txt for building Tolk with CMake. CMake is supported by Visual Studio 2019 but I would advise to use cmake from console or using the official CMake tool.

A Github workflow is also included which publish the newly built version of Tolk

@mfdeveloper
Copy link

mfdeveloper commented Feb 19, 2022

Hi @bear101 ! How are you?

First of all, thank you so much for sharing this CMakeLists.txt

I found an issue when I tried use CMake, to compile .rc files without Visual Studio (e.g using Ninja)
To fix this, I found this solution below:

 # Include Directories, NOTE THE RC LANGUAGE IS IMPORTANT!
 foreach(LANG  C CXX RC)
    set(CMAKE_${LANG}_STANDARD_INCLUDE_DIRECTORIES ${CUSTOM_INCLUDE_DIRECTORIES})
 endforeach()

However, I got this another problem now:

[build] [1/1 100% :: 3.282] Linking CXX shared library libTolk.dll
[build] FAILED: libTolk.dll libTolk.dll.a 
[build] cmd.exe /C "cd . && C:\msys64\mingw64\bin\x86_64-w64-mingw32-g++.exe -g   -shared -o libTolk.dll -Wl,--out-implib,libTolk.dll.a -Wl,--major-image-version,0,--minor-image-version,0 CMakeFiles/Tolk.dir/src/Tolk.cpp.obj CMakeFiles/Tolk.dir/src/TolkJNI.cpp.obj CMakeFiles/Tolk.dir/src/ScreenReaderDriverJAWS.cpp.obj CMakeFiles/Tolk.dir/src/ScreenReaderDriverNVDA.cpp.obj CMakeFiles/Tolk.dir/src/ScreenReaderDriverSA.cpp.obj CMakeFiles/Tolk.dir/src/ScreenReaderDriverSNova.cpp.obj CMakeFiles/Tolk.dir/src/ScreenReaderDriverWE.cpp.obj CMakeFiles/Tolk.dir/src/ScreenReaderDriverZT.cpp.obj CMakeFiles/Tolk.dir/src/ScreenReaderDriverSAPI.cpp.obj CMakeFiles/Tolk.dir/src/fsapi.c.obj CMakeFiles/Tolk.dir/src/wineyes.c.obj CMakeFiles/Tolk.dir/src/zt.c.obj  -lUser32  -lOle32  -lOleAut32  -lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 && cd ."
[build] C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/Tolk.dir/src/ScreenReaderDriverSAPI.cpp.obj:ScreenReaderDriverSAPI.cpp:(.rdata$.refptr.CLSID_SpVoice[.refptr.CLSID_SpVoice]+0x0): undefined reference to `CLSID_SpVoice'
[build] C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/11.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: CMakeFiles/Tolk.dir/src/ScreenReaderDriverSAPI.cpp.obj:ScreenReaderDriverSAPI.cpp:(.rdata$.refptr.IID_ISpVoice[.refptr.IID_ISpVoice]+0x0): undefined reference to `IID_ISpVoice'
[build] collect2.exe: error: ld returned 1 exit status
[build] ninja: build stopped: subcommand failed.
[build] Build finished with exit code 1

Do you know how can I solve this FAILED: libTolk.dll libTolk.dll.a error?

@bear101
Copy link
Author

bear101 commented Feb 20, 2022

Hm, try adding "Sapilib" to TOLK_LINK_FLAGS:
https://docs.microsoft.com/en-us/previous-versions/ms937488(v=msdn.10)

@AJenbo
Copy link

AJenbo commented Mar 9, 2023

Adding sapi and fixing the lib casing also allowed this it to build on Linux for me. I made a PR on this fork in case anyone else might need this: sig-a11y#2

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

Successfully merging this pull request may close these issues.

3 participants