behdad / cairo Goto Github PK
View Code? Open in Web Editor NEWClone of cairo graphics library
License: Other
Clone of cairo graphics library
License: Other
I have built a test program with harfbuzz and cairo in MSVC2022 (MSBuild project, language c++20) in debug configuration. The code has a line cairo_glyph_path(cr, cairoglyphs, glyph_count);
. When running the program (F5, Start Debugging), I receive a debug assert in cairo-dwrite-font.cpp, line 739, function _controlfp_s(&control_word, _CW_DEFAULT, MCW_PC);
"Debug Assertion Failed! ... File: minkernel/crts/ucrt/appcrt/tran/amd64/ieee.c"
resulting from use of an unassigned variable unsigned int control_word;
.
When the same program is built in MSVC CMake project (platform Local machine (Windows10), language C++20), it runs without these annoying debug assert message popups. The reason is obvious: the MSBuild project copies the file \vcpkg\installed\x64-windows\debug\bin\cairo-2.dll into the \x64\debug folder, while the CMake project does not copy dll files into the ...\out\build<projectName> folder but the project executable directly loads dll modules from the directories specifies with the PATH environment (like \vcpkg\installed\x64-windows\debug\bin, \vcpkg\installed\x64-windows\bin) and selects the cairo-2.dll linked in the release configuration.
To be able to debug my MSBuild-linked program, I have to specify what cairo-2.dll of the two MSVC should use, adding the Postbuild event copy /Y "C:\vcpkg\installed\x64-windows\bin\cairo-2.dll" $(TargetDir)
for the debug configuration.
The cairo-dwrite-font.cpp code update initializing the control_word
variable before its use would solve the issue.
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.