Today I got “error LNK2005: _DllMain@12 already defined in msvcrtd.lib” while linking some C++ CLI project with MFC support in MS Visual Studio 2013. As described in A LNK2005 error occurs when the CRT library and MFC libraries are linked in the wrong order in Visual C++A LNK2005 error occurs when the CRT library and MFC libraries are linked in the wrong order in Visual C++ article, I added /verbose:lib linker option:
Tag Archives: visual-studio
Combining XAML and DirectX together in a WinRT application
With the release of Windows 8, Microsoft introduced a grate technology for combining XAML and DirectX together, letting us to place XAML controls over intensive real-time graphics, see DirectX and XAML interop (Windows Runtime apps using DirectX with C++) for more details.
You can easily download and build sample XAML SwapChainPanel DirectX interop sample demonstrating how it works. All that you need is Visual Studio 2013 with installed license. After the license is installed Visual Studio 2013 shows the following dialog:
How to compile BOOST with MS Visual Studio 2010-2017
Fortunately, to compile BOOST with MS VC 2010 we need Visual Studio Command Prompt and five commands:
Navigate to BOOST directory, for example:
F: cd F:\Projects\Lib\boost_1_53_0
How to make PHP Web Service with NuSoap
While investigating how to create a Web Service in PHP I run into NuSoap library, that can generate WSDL based on some matadata describing Web Service method signatures and the data structures. I downloaded NuSoap library and found some trivial sample that started working after adding the highlighted line of code:
Seeing design time data in a WPF control
Sometimes the ability to see the data at design time significantly facilitates the creation of WPF controls. If I am developing a WPF control with complex UI using data bound controls, I usually define a property for accessing some typical data item:
public static ComplexData DesignTimeItem { get { using (DatabaseContext db = new DatabaseContext()) { var products = from p in db.products.Include("ProductType") where p.product_id == 131 select p; product product = products.First(); return new ComplexData(product, "100 kg"); } } }