Recently I got interests in clang & its library(Libtooling, more specifically) so that I decided to start digging in. However, the first frustration came from while building the clang examples. Download and build the clang source tree Building the clang executable was easy. The Clang website provides instructions and you’ll get the result by just … Continue reading Where’s my ‘llvm/tools/clang/example’ binaries?
Tag: C++
Demo app shows std::stable_partition and std::rotate works
https://channel9.msdn.com/Events/GoingNative/2013/Cpp-Seasoning From the beginning of Sean Parent's great C++ talk, he represented two std algorithms people may not be familiar of. It's 'std::stable_partition' and 'std::rotate'. I made a small demo application shows how the two algorithms works. It's Qt5 based application so that you can freely compile and run from Windows, mac or Linux. Grab … Continue reading Demo app shows std::stable_partition and std::rotate works
How to embed the PDFjs into your C# Project
TL;DR https://github.com/pvginkel/PdfiumViewer is recommended if you're okay with just viewing PDFs. If you need more complicated features, then convert the PDF into base64 and pass it to a javascript function which decodes and call the PDFViewerApplication.open which is implemented at viewer.js However, it's really, really slow. The example source is at https://github.com/heejune/WinForm-PDFjs If you needed … Continue reading How to embed the PDFjs into your C# Project
C# Conditional assembly reference
If you want to include assemblies conditionally upon its preprocessor from c# project, you can use Condition keyword. See the following snippet. xx.csproj <Reference Condition=" $(DefineConstants.Contains('XXX_LIB_OS')) " Include="DRVNAME1, Version=1.1.1.0, Culture=neutral, PublicKeyToken=xxxxx, processorArchitecture=AMD64"> ... </Reference> <Reference Condition=" $(DefineConstants.Contains('XXX_LIB_APP')) " Include="APPNAME1, Version=1.1.1.0, Culture=neutral, PublicKeyToken=xxxxxxx, processorArchitecture=AMD64"> ... </Reference> Then define the constant <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'"> <DebugSymbols>true</DebugSymbols> <OutputPath> ... … Continue reading C# Conditional assembly reference
CppRest SDK(Casablanca) + static CRT link = caution! (might cause debug heap assert)
The C++ REST SDK(Casablanca) is currently only available to link dynamically(DLL) unless you build the library on your own. Here is the link describing the steps to link static to your application by downloading the source code and building it so. If you're using the cpprest sdk and unfortunately encountered the following debug heap assert, you probably made mismatch configuration for … Continue reading CppRest SDK(Casablanca) + static CRT link = caution! (might cause debug heap assert)
Tips for debugging COM AddRef/Release leaks
In Windows environment, adding an accessibility support to a program means you'll have to do a lot of COM coding. For example, IRawElementProviderSimple is the most fundamental interface you should implement for every provider. So at first I started developing providers with ATL and throughout the process I learned few tips I'd like to share here: 1. Add the '_ATL_DEBUG_INTERFACES' … Continue reading Tips for debugging COM AddRef/Release leaks
Assigning NULL to std::function issue from VS2010/VS2013
Yesterday I tried to migrate a Visual Studio 2010 C++ project to Visual Studio 2013. But it instantly shows a compile error pointing xrefwrap header which wasn't clear at first. Here is the output: 4>C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include\xrefwrap(283): error C2064: term does not evaluate to a function taking 2 arguments 4> C:\Program Files (x86)\Microsoft … Continue reading Assigning NULL to std::function issue from VS2010/VS2013